T
tim.leach
I'm trying to use the ApplyFilter method in a VB event procedure. I
keep getting a runtime error. I'm not sure what I'm missing.
Runtime Error '2488'
You can't use the ApplyFilter action on this window.
blah
blah
blah
Use the SelectObject action or method to select the table, query, form
or report before applying the filter.*
*I thought that was what I was doing.
Any help is greatly appreciated. Here's my code:
Private Sub Command94_Click()
Dim tablename$
tablename = "Compare previous history - run 1"
DoCmd.OpenTable (tablename)
DoCmd.Maximize
DoCmd.SelectObject acTable, tablename,False
DoCmd.ApplyFilter , "[ACCOUNT NUMBER] = '123456789'"
End Sub
TIA
keep getting a runtime error. I'm not sure what I'm missing.
Runtime Error '2488'
You can't use the ApplyFilter action on this window.
blah
blah
blah
Use the SelectObject action or method to select the table, query, form
or report before applying the filter.*
*I thought that was what I was doing.
Any help is greatly appreciated. Here's my code:
Private Sub Command94_Click()
Dim tablename$
tablename = "Compare previous history - run 1"
DoCmd.OpenTable (tablename)
DoCmd.Maximize
DoCmd.SelectObject acTable, tablename,False
DoCmd.ApplyFilter , "[ACCOUNT NUMBER] = '123456789'"
End Sub
TIA