Need help with date syntax error

  • Thread starter Thread starter Russ via AccessMonster.com
  • Start date Start date
R

Russ via AccessMonster.com

trying to open form based on two dates;

stLinkCriteria = "[TransactionDate]=Between #" & Me.Beginning_Trans_Date & "#
and #" & Me.Ending_Trans_Date & "#"""

Do not know where I went wrong, please help.
Thanks
 
trying to open form based on two dates;

stLinkCriteria = "[TransactionDate]=Between #" & Me.Beginning_Trans_Date & "#
and #" & Me.Ending_Trans_Date & "#"""

Do not know where I went wrong, please help.
Thanks

The = operator searches for one value. The BETWEEN operator searches
for a range between two values. Use one or the other, not both. You
also have an extra pair of uneeded quotes at the end:

stLinkCriteria = "[TransactionDate] Between #" &
Me.Beginning_Trans_Date & "# and #" & Me.Ending_Trans_Date & "#"


John W. Vinson[MVP]
 
Try:
stLinkCriteria = "[TransactionDate]=Between #" & Me.Beginning_Trans_Date &
"# and #" & Me.Ending_Trans_Date & "#"
 
John,
this one did the trick, thanks!

stLinkCriteria = "[TransactionDate]Between #" & Me.Beginning_Trans_Date & "#
AND #" & Me.Ending_Trans_Date & "#"

John said:
trying to open form based on two dates;
[quoted text clipped - 3 lines]
Do not know where I went wrong, please help.
Thanks

The = operator searches for one value. The BETWEEN operator searches
for a range between two values. Use one or the other, not both. You
also have an extra pair of uneeded quotes at the end:

stLinkCriteria = "[TransactionDate] Between #" &
Me.Beginning_Trans_Date & "# and #" & Me.Ending_Trans_Date & "#"

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top