The MS Access DB engine does not recognize '' as a valid field name or expression.

ARW17

Board Regular
Joined
Oct 31, 2016
Messages
109
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?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
The problem was that it was going through a crosstab query and not making it out the other side.

Once I set the query parameters and column headers, it worked ok.
 
Upvote 0

Forum statistics

Threads
1,215,872
Messages
6,127,437
Members
449,382
Latest member
DonnaRisso

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top