I have a form with tabs for different dates. I have a text box that updates as users click on different tabs so that I can present the user with their schedule for that day.
The field that updates with the tab dates is txtTab. It's on my Self-Service form.
Here's an example of how it updates with the correct date:
If DayTabs.Pages(DayTabs.Value).Name = "TodayPlus1" And Weekday(Date) <> 6 Then
TxtTab = DateAdd("d", 1, Date)
Else
If DayTabs.Pages(DayTabs.Value).Name = "TodayPlus1" Then
TxtTab = DateAdd("d", 3, Date)
End If
End If
The query is too slow when I set the dates to grab a month at a time (which is how many date tabs I have) so instead, I wanted to bound the date in the query to the txtTab control. The query works fine, but when I try to open the form that has the query in it, it tells me that "The MS Access DB engine does not recognize '[Forms]!Self-Service]![txtTab]' as a valid field name or expression.
What am I doing wrong?
The field that updates with the tab dates is txtTab. It's on my Self-Service form.
Here's an example of how it updates with the correct date:
If DayTabs.Pages(DayTabs.Value).Name = "TodayPlus1" And Weekday(Date) <> 6 Then
TxtTab = DateAdd("d", 1, Date)
Else
If DayTabs.Pages(DayTabs.Value).Name = "TodayPlus1" Then
TxtTab = DateAdd("d", 3, Date)
End If
End If
The query is too slow when I set the dates to grab a month at a time (which is how many date tabs I have) so instead, I wanted to bound the date in the query to the txtTab control. The query works fine, but when I try to open the form that has the query in it, it tells me that "The MS Access DB engine does not recognize '[Forms]!Self-Service]![txtTab]' as a valid field name or expression.
What am I doing wrong?