Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bookmarks and combo boxes

Status
Not open for further replies.

jgarnick

Programmer
Feb 16, 2000
189
US
I have a form that has a combo box that is based on a query with only one table. I have the following code behind the on-click, double-click and on change properties. I have not knowingly changed anything on this form, nor to the query/table that the combo box is based on. The query shows records in datasheet mode just fine. And the combo box displays them also. But when you click on a name, I get a message that says-- "Run-time error 3021 No current record." Why is this happening??

Private Sub Combo138_Click()
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo138]
'the program stops at the next statement
Me.Bookmark = Me.RecordsetClone.Bookmark

End Sub [sig]<p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br> [/sig]
 
I'd place the code in the AfterUpdate event, not the others you stated..... also if the type of date bound to combo138 is text, then you need to enclose the value in quotes
(the following example uses a single quote.

Me.RecordsetClone.FindFirst &quot;[ID] = '&quot; & Me![Combo138] & &quot;'&quot;

PaulF [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top