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!

How do I use a combobox click event to requery the recordsource?

Status
Not open for further replies.

LexSteel

Programmer
Dec 19, 2001
6
US
Good afternoon all,
I know this is simple and rudimentary, but all I want to do is display the records associated with a particular EmployeeID upon clicking on the selection in the combobox.
Thank you, I'm new. Also, would it matter if the form were used as a subform as far as the master-child fields or would the requery make those properties moot? Thank you in advance and have a good day.
 
Quick and simple: When you place the combobox on your form, make sure you have the wizard activated. It will ask you what you want the combobox to do, and you need to pick "Jump to a record based on my selection." It should lead you through it pretty painlessly.

--Ryan
 
Here is code snippet I found somewhere. It's using a listbox afterupdate event to update the field of the form, as long as the fields are NOT unbound as far as record source.

Private Sub lstCurrentCustomer_AfterUpdate()

' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[CustomerID] = " & Str(Me![lstCurrentCustomer])
Me.Bookmark = rs.Bookmark
Me.cmdDelete.Enabled = True


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top