I'm new to VBA...here's what I'm trying to do.
I have a main form which is the user interface and would like to create a button that will open a table and apply a filter to that table.
Here's what I got...
Private Sub OpenPFTable_Click()
On Error GoTo Err_OpenPFTable_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "tbl Problem Freight"
DoCmd.OpenTable stDocName, acViewNormal
Exit_OpenPFTable_Click:
Exit Sub
Err_OpenPFTable_Click:
MsgBox Err.Description
Resume Exit_OpenPFTable_Click
End Sub
How would I appy a filter in the code???
Thanks,
Jan
I have a main form which is the user interface and would like to create a button that will open a table and apply a filter to that table.
Here's what I got...
Private Sub OpenPFTable_Click()
On Error GoTo Err_OpenPFTable_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "tbl Problem Freight"
DoCmd.OpenTable stDocName, acViewNormal
Exit_OpenPFTable_Click:
Exit Sub
Err_OpenPFTable_Click:
MsgBox Err.Description
Resume Exit_OpenPFTable_Click
End Sub
How would I appy a filter in the code???
Thanks,
Jan