Select Only Records For Specific ID Query

fenhow

Registered User.
Local time
Today, 11:09
Joined
Jul 21, 2004
Messages
599
This is killing me,

I have a form with a unique ID, I have a query that pulls all data regardless of the ID on the form.

How can I get the Query to pull only the data for the ID that is currently in view on the form?

Please help..

Thanks,

Fen How
 
In the criteria for that field:

Forms!FormName.ControlName
 
Lets say your Unique ID (fldID) will be selected from a combo box (cmbID) and the query bounded to the form has fldID in it (SELECT fldID ... )

Have your combo box cmbID Unbounded and on After update event do the following:
Code:
Private Sub cmbID_AfterUpdate()
    Me.Recordset.FindFirst "fldID = " & cmbID
End Sub

so each time you select an ID it will show the record for that ID.
 

Users who are viewing this thread

Back
Top Bottom