Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 find record button not working

Author  Topic 

jleiker
Starting Member

13 Posts

Posted - 2004-11-19 : 04:04:57
We upgraded from 97 to access 2003. Now our find record buttons are not working....it finds the employee and sorts them by employee you found...but not the date.

Here is the code behind it:

Dropdown code for date:
Private Sub Combo33_AfterUpdate()
On Error GoTo Err_Combo33_afterupdate

' Find the record that matches the control.

Me.RecordsetClone.FindFirst "[date of processing] = " & Me![Combo33]
Me.Bookmark = Me.RecordsetClone.Bookmark
Exit_Combo33_afterupdate:
Exit Sub
Err_Combo33_afterupdate:
MsgBox err.Description
Resume Exit_Combo33_afterupdate

Here is dropdown code for employee choice:
Private Sub Combo275_AfterUpdate()
On Error GoTo Err_AfterUpdate_afterupdate

' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Employee#] = " & Me![Combo275]
Me.Bookmark = Me.RecordsetClone.Bookmark
Exit_Combo275_AfterUpdate_afterupdate:
Exit Sub
Err_AfterUpdate_afterupdate:
MsgBox err.Description
Resume Exit_Combo275_AfterUpdate_afterupdate
End Sub
Here is the 'find record' button code: AFter they click on this is when it's finding only employee and not date:

Private Sub Command279_Click()

Dim strFilter As String

strFilter = "[Employee#] = " & Me!Combo275 & " AND [Date of processing] = #" & Me!Combo33 & "#"
Me.filter = strFilter
Me.FilterOn = True


   

- Advertisement -