lightkeepr
Registered User.
- Local time
- Today, 08:01
- Joined
- Sep 18, 2012
- Messages
- 15
What VBA code would I use if I wanted to open a table called 'Payroll' and filter the field 'DateWorked' using dates stored in another table [SEDates].[StartDate] and [SEDates].[EndDate]?
I have tried the following:
DoCmd.OpenTable "Payroll"
DoCmd.SetFilter , [Payroll].[DateWorked] = "Between [SEDates].[StartDate] And [SEDates].[EndDate]"
and when I exectute the code, it pops a box asking for the values for [SEDates].[StartDate] and then [SEDates].[EndDate]
I have tried the following:
DoCmd.OpenTable "Payroll"
DoCmd.SetFilter , [Payroll].[DateWorked] = "Between [SEDates].[StartDate] And [SEDates].[EndDate]"
and when I exectute the code, it pops a box asking for the values for [SEDates].[StartDate] and then [SEDates].[EndDate]