Hi
I have a form which is continuous and set as Snapshot.
I have a combo box which selects a job (its ID, eg 1) as the criteria.
the below code relates to a command button.
I assume this code ONLY finds the first record and obviously I want to display all the 1s...
I would like to use an SQL statement as I would like to use DISTINCT
eg, SELECT DISTINCT JobsID, EmpRegNo FROM tblPayInv WHERE JobsID = me.cmbJobs
The collumns in the form are:
TransID ¦ JobsID ¦ EmpRegNo ¦ WEdate
Please can u help.
Thx
Darin
(Would an applyfilter be any better???)
Dim rs As Object
Set rs = Me.Recordset.Clone
'this also partially works
rs.FindFirst "[JobsID] = " & Me.cmbJobs
'rs.FindFirst "[EmpRegNo] = " & Str(Nz(Me![cmbName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I have a form which is continuous and set as Snapshot.
I have a combo box which selects a job (its ID, eg 1) as the criteria.
the below code relates to a command button.
I assume this code ONLY finds the first record and obviously I want to display all the 1s...
I would like to use an SQL statement as I would like to use DISTINCT
eg, SELECT DISTINCT JobsID, EmpRegNo FROM tblPayInv WHERE JobsID = me.cmbJobs
The collumns in the form are:
TransID ¦ JobsID ¦ EmpRegNo ¦ WEdate
Please can u help.
Thx
Darin
(Would an applyfilter be any better???)
Dim rs As Object
Set rs = Me.Recordset.Clone
'this also partially works
rs.FindFirst "[JobsID] = " & Me.cmbJobs
'rs.FindFirst "[EmpRegNo] = " & Str(Nz(Me![cmbName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark