Easy Questions?
I created a button that runs a Macro to do the following:
1. OpenForm (Form Name: Business)
2. ApplyFilter (Where Condition: [Business]![City]="Columbus")
It works fine, BUT I want to get away from Macros and write the code. So I assume I write the code using the On Load event (also tried After Update event). But the following didn't work (result was no records):
-----------------------------------------------------------------------
Private Sub Form_Load()
DoCmd.ApplyFilter , Forms![Business]![City] = "Columbus"
End Sub
-------------------------------------------------------------------------
But there are records because the Macro works.
What code does the MACRO write?
I know there are some great minds in this forum
...please help!

I created a button that runs a Macro to do the following:
1. OpenForm (Form Name: Business)
2. ApplyFilter (Where Condition: [Business]![City]="Columbus")
It works fine, BUT I want to get away from Macros and write the code. So I assume I write the code using the On Load event (also tried After Update event). But the following didn't work (result was no records):
-----------------------------------------------------------------------
Private Sub Form_Load()
DoCmd.ApplyFilter , Forms![Business]![City] = "Columbus"
End Sub
-------------------------------------------------------------------------
But there are records because the Macro works.
What code does the MACRO write?
I know there are some great minds in this forum
...please help!
