Filtering Macro question?
If I have column headings named
Wire
Walker Conn #
Base Sensor
Only the first DoCmd works ("wire =wires")
I get an error on the other two.
I have tried different syntax and have not been able to get it to work.
VB Code:
Public Sub SampleSearch()
DoCmd.ShowAllRecords
DoCmd.ApplyFilter , "wire = wires"
DoCmd.ApplyFilter , "Walker Conn # = ConnNum"
DoCmd.ApplyFilter , "Base Sensor = BaseSensor"
End Sub
Re: Filtering Macro question?
Quote:
DoCmd.ApplyFilter , "Walker Conn # = ConnNum"
DoCmd.ApplyFilter , "Base Sensor = BaseSensor"
I could be wrong but i guess it might be because of the space between the words...
Try changing the column headings to Walker_Conn_# and Base_Sensor...
Hope it helps...
Re: Filtering Macro question?
I tried this and still only the first one works([wires] = wire)?
VB Code:
Public Sub SampleSearch()
DoCmd.ShowAllRecords
DoCmd.ApplyFilter , "[wires] = wire"
DoCmd.ApplyFilter , "[WalkerConnNum] = Connnum"
DoCmd.ApplyFilter , "[BaseSensor] = BaseSensor"
PrgramEnd:
End Sub
I renamed my columns to match
wires
WalkerConnNum
BaseSensor
Morgan
Re: Filtering Macro question?
and i cannot find this command listed in help??
DoCmd.ApplyFilter
any ideas??
Morgan