can someone tell me what I'm doing wrong

charlee63

Board Regular
Joined
Jan 7, 2010
Messages
146
I am using
DoCmd.OpenForm "Issues Data", acNormal, "", "Issue #=" & Me.[Issue #], , acNormal
to Double click on an issue number to bring up the data on that number.
But keep get a "Syntax Error in Date in the Query Expression 'Issue # - ISM1040109'." Error


Issue # is not a Date? It is a text field.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
The # symbol is used as Date Qualifiers in Access (i.e. #1/1/2016#). This is a good reason why you should never use symbols or special characters in names of objects, fields, or variables.
You could try:
"[Issue #]=" & Me.[Issue #]

though I would highly recommend changing the name of your field, if at all possible.
 
Upvote 0
Ok I change the field names DoCmd.OpenForm "Issues Data", , , "[Issue]=" & Me.[Issue] and now I get a box that Says "Enter Parameter Value" Twice one with the Header Issue and the other with ISM1040109
 
Upvote 0
It thinks it is a parameter query now, and is prompting you.
I think you may have to try changing that field name. It definitely violates good naming standards. You want to avoid using special characters or reserved words. It is also recommend to avoid using spaces (I recommend using underscores in place of spaces). If you keep it to numbers, letters, and underscores and avoid reserved words, you will be in good shape.
 
Upvote 0

Forum statistics

Threads
1,221,828
Messages
6,162,215
Members
451,752
Latest member
freddocp

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