Linking a query field to a text box in a form

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
420
Hello all.

I knew how to do this at one time, but for the life of me....I can't remember.

I want to launch a query using a form with a Beginning Date and an End Date. Here is the criteria field I have in the query:

Between [Forms]![frm_Transaction Detail Inquiry]![Beginning Date] And [Forms]![frm_Transaction Detail Inquiry]![End Date]

The text box control source I have in the form:

=[qry_Detail]![Trans Date]![Beginning Date]


And

=[qry_Detail]![Trans Date]![End Date]


Where am I going astray? Thank you.
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
Are the textboxes on the form named in the criteria and do they have the names [Beginning Date] and [End Date]?

Also, how are things not working?

No values returned?

Incorrect values returned?

Errors?
 

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
420
Sorry. I get a #Name? in the text box in Form View mode.

The name I have is Beginning Date for one and End Date for the other text box.

Thanks for your help.
 

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
420
I figured it out....I was looking incorrectly using the query as the control source for the text box form.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,314
Members
414,053
Latest member
Dual Showman

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
Top