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

Combo box issue

Status
Not open for further replies.

deanerref

MIS
Nov 4, 2003
5
CA
Can someone tell me how I can use a combo box to goto a record. I know how to get the combo box open and even so I can see the list of people. but how do I get it so that when I click on a name it goes to the persons record page.
I have been having problems with this. Even stopped at the library to get an access book... Still having problems

Thanks
Dean
 
Hi deanerref,

why don't use a macro or vode to run a query using the value of the combo box. on the combo box even after event will work.

hope this help
 
An easy way to accomplish this would be to use the forms recordset.

So, on the combobox "LostFocus" event have code similar to the following:

dim rs as dao.recordset

set rs = me.recordset

rs.findfirst "EmployeeName = " & combobox.text
if rs.nomatch = true then
msgbox "No matching name found"
end if

let me know if you need anymore help.
 
Or the old two liner is always good for a quick get it and go to record:

Code:
Me.RecordsetClone.FindFirst "[WhateverIDYouWillPutInHereToFind] = " & Me![NameOfComboBox]
Me.Bookmark = Me.RecordsetClone.Bookmark


If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
Oh yeah my code goes in the after_update event of the combobox.

And another thing make sure in your combobox you have the ID field from the table AND the other field(s) you want present in the combobox. Set the column count = 2 and set the column widths = 0,2. Yeah just like that.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top