p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > SQL Server > SQL Server ASP
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 28th, 2008, 09:09 AM
Registered User
 
Join Date: Apr 2008
Location: pearland, texas, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to captainlove
Default How do I delete a record from a subform

Here is my code, but it is not working. The error is saying user defined type not defined.

Private Sub cmdinsertlist_Click()

Dim Rs As DAO.Recordset
Set Rs = CurrentDb.OpenRecordset("Select * From tblrefLink Where refID = " & Me.ID & " And UserID = '" & Forms.frmqcpList2.txtQcp & "'")

If Not Rs.EOR Or Not Rs.BOF Then
    Do Until Rs.EOF
       Rs.Delete
       Rs.Update
       Rs.MoveNext
   Loop
   Rs.Close
End If

Set Rs = Nothing


End Sub

lucasfatoye
__________________
lucasfatoye
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 29th, 2008, 01:01 AM
Authorized User
Points: 205, Level: 4
Points: 205, Level: 4 Points: 205, Level: 4 Points: 205, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2003
Location: Delhi, Delhi, India.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default

In which language are you trying all this, VB or ASP? What does Me.ID and Forms.frmqcpList2.txtQcp denotes?


Prabodh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a record from a subform captainlove Access VBA 3 May 1st, 2008 12:38 PM
Delete a record row, not just the record. Coby Access VBA 1 April 30th, 2007 07:29 AM
setting subform to new record skinny Access 4 January 3rd, 2006 02:57 PM
Creating a new record in a subform dlamarche Access 3 February 18th, 2005 12:33 AM
Subform only may contains 1 record Stanny Access 5 December 21st, 2004 11:17 AM



All times are GMT -4. The time now is 03:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc