G
Geoff D
I'm trying to make an Access 2003 database work in 2007. One feature that
doens't work in 2007 involves applying a filter to the list of sites.
There's a button which opens a form where you pick from the list of sites.
This is the code for the button ...
Private Sub Find_Click()
DoCmd.OpenForm "Select Site Name", , , , , A_DIALOG
If IsNull([Forms]![Select Site Name]![site name]) Then
GoTo EndProc
End If
DoCmd.ApplyFilter , "[Site Name] Like [Forms]![select site name]![site
name]"
EndProc:
DoCmd.Close A_FORM, "Select Site Name"
End Sub
I put out the [site name] with MsgBox after the form, and this is correct,
but the filter only works the first time. Subsequent attempts only display
the first filter.
This is causing me some frustration! Advice would be most welcome.
Geoff
doens't work in 2007 involves applying a filter to the list of sites.
There's a button which opens a form where you pick from the list of sites.
This is the code for the button ...
Private Sub Find_Click()
DoCmd.OpenForm "Select Site Name", , , , , A_DIALOG
If IsNull([Forms]![Select Site Name]![site name]) Then
GoTo EndProc
End If
DoCmd.ApplyFilter , "[Site Name] Like [Forms]![select site name]![site
name]"
EndProc:
DoCmd.Close A_FORM, "Select Site Name"
End Sub
I put out the [site name] with MsgBox after the form, and this is correct,
but the filter only works the first time. Subsequent attempts only display
the first filter.
This is causing me some frustration! Advice would be most welcome.
Geoff