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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search combobox

Status
Not open for further replies.

lrumd

Technical User
Sep 5, 2002
25
US
I have a Search combo box which is a unbound control on a form that opens up a large table [Sleep]. I am not sure where this came from, but it works OK. This is the code that I have in the AfterUpdate()

Private Sub Search_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Me![Search])
Me.Bookmark = rs.Bookmark
End Sub

In the properties of this combobox:
RowsourceType: Table/Qwery
Rowsource: SELECT[Sleep].[ID],[Sleep].[Last Name] FROM Sleep;


Now then: I have created a Qwery [Done] that pulls up only those records that meet a certain criteria (eg. Done=Yes), and have created a Form based on this Qwery. I want to place a similar Search ComboBox that would look up the Last Name in the Qwery (not the original table). It has to Autofill too. I have tried the above code but it doesn't work. What am I doing wrong?

Please help

Thanks

Luis[atom]
 
Have a read through this thread, I think it should help with what you are trying to do.

thread702-358402 Tezdread
"With every solution comes a new problem"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top