button to find record based on combo box selection

krowe

Registered User.
Local time
Today, 05:28
Joined
Mar 29, 2011
Messages
159
Hi again

I have a subform (called sfrmLinks), this is a child to the main form (frmMain) in my db which I want to use to be able to navigate to linked records.

Basically, in the subform have 3 combo boxes where I can select and store the linked records.

Next to each is a button, and i want to navigate to the linked file when the button is pressed.

I think the code is something like this:

Code:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Me![Combo12]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

but it doesnt work. I think it is something to do with the fact the combo box is on a subform and the ID is on the parent form.

can anybody help me please.
 
You don't need a button.
Look at "DemoFindA2002.mdb" (Attachment, zip).
Open frmForm1 and try.
 

Attachments

Hi

Thanks for your reply, but ive looked at the example and im not sure that is exactly what im looking for.

I need the combo box entries to be permenantly in that control, the user will be able to set up 3 links per record, then, if needed use the buttons to look at the associated record (not like a normal combo box search where the entries are not permenantly stored in the control)

Thanks

Kev
 
Hi MStef,

I am interested in your DemoFind. However, I am working in Access 2007 and it doesn't like the STR function. I am a newbie to Access and don't know what the replacement would be in Access 2007. Could you help me here?

Thanks so much!
~RLG
 
Hello RanaG!
I don't know for A2007. I suspect that it is a STR function.
Maybe something else you need to change. Try and see.
 

Users who are viewing this thread

Back
Top Bottom