38JJC
Feb 25 2009, 02:22 PM
I created a Form with 2 combo boxes that filter by Customer and then by the Customer Job Number. The Customer Job Number combo box's after update event showsl the records for that job.Coded as follows:
Private Sub cboBSCID_AfterUpdate()
DoCmd.ShowAllRecords
Me!txtBSCID.SetFocus
DoCmd.FindRecord Me!BSCID
Me.cboBSCID.Value = ""
End Sub
The problem is I'm getting all the customers job data, not the 1 job number chosen in Combo box cbo.BSCID.
The criteria in the BSCID field in the underlying query is set at Forms!Jobs.cobBSCID
fkegley
Feb 25 2009, 04:27 PM
Is this correct?
DoCmd.FindRecord Me!BSCID
Shouldn't it be this?
DoCmd.FindRecord Me!cboBSCID
38JJC
Feb 25 2009, 04:34 PM
I get a run time error with either,
Error 2162
A macro set to one of the current fields properties failed because of a an error in the FindRecord action argument.
38JJC
Feb 25 2009, 04:47 PM
I Changed to form RecordSource to a query with the BSCID criteria set to the cboBSCID combo box, It seems to work fine.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.