Jump to a record based on a combobox

ppataki

Registered User.
Local time
Today, 04:04
Joined
Sep 5, 2008
Messages
267
Dear All,

I have a simple form bound to a table
I have a combobox on it and I would like the form to display the record that contains the value of the field I select in the combobox

I tried the following but it does not work, nothing happens:

Code:
Private Sub CustNameCombo_Click()
DoCmd.FindRecord Me.CustNameCombo
End Sub

Could you please advise?
Many thanks
 
Look at "DemofindA2000.mdb" (attachment, zip).
Open form and try.
Look at VBA.
 

Attachments

Hello,

I have tried it like this:
Code:
Private Sub CustCombo_AfterUpdate()
Me.RecordsetClone.FindFirst "[CustName] = " & Chr(34) & Me.CustCombo & Chr(34)
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

and still nothing happens
Any suggestions please?
Many thanks
 
I did it:

Code:
Private Sub CustCombo_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Custname] = '" & Me![CustCombo] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

still nothing...
What do I do incorrectly?

Thank you very much
 
Is the "Custname" field TEXT or NUMBER ??
 
This is a new Access X-files!

I have just deleted the combobox, created a new one and now it works!!!
Thank you very much for your help!!!!
 

Users who are viewing this thread

Back
Top Bottom