If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Syntax error in date in query expression issue
I have a macro on change of a field that sets the value of various other
fields in a form, based on ID's matching. I just needed to add another field to set the value of and on update am gettings this error: "sntax error in date in query expression." The field who's value I'm trying to set is not a date, it's text. Here's the macro: Item: [Forms]![frmMeeting]![subfrmAttendees].[Form]![FacilLicense#] Expression: DLookUp("FacilLicense#","qrySpeakers","SpeakerID=F orms! [frmMeeting]![subfrmAttendees].Form![SpeakerID]") why would I be getting this error? Thanks! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#2
|
|||
|
|||
Syntax error in date in query expression issue
put brackets around FaciLicense# in the Dlookup
DLookup("[FaciLicense#]".... Access sees the pound sign and thinks it is a date. |
#3
|
|||
|
|||
Syntax error in date in query expression issue
floyd33,
Right off the top, get rid of the "#" in any field/object names you may have. "#" is used by Access in date designations. Let's try that first... that might just be the problem. Also, is... "syntax error in date in query expression." all you get in the message? It doesn't show part of the string that's failing? -- hth Al Campagna Microsoft Access MVP 2006-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "floyd33 via AccessMonster.com" u17874@uwe wrote in message news:a2d779f14f6cb@uwe... I have a macro on change of a field that sets the value of various other fields in a form, based on ID's matching. I just needed to add another field to set the value of and on update am gettings this error"sntax error in date in query expression." The field who's value I'm trying to set is not a date, it's text. Here's the macro: Item: [Forms]![frmMeeting]![subfrmAttendees].[Form]![FacilLicense#] Expression: DLookUp("FacilLicense#","qrySpeakers","SpeakerID=F orms! [frmMeeting]![subfrmAttendees].Form![SpeakerID]") why would I be getting this error? Thanks! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#4
|
|||
|
|||
Syntax error in date in query expression issue
You rock. That was it, right off the bat. I appreciate it.
ghetto_banjo wrote: put brackets around FaciLicense# in the Dlookup DLookup("[FaciLicense#]".... Access sees the pound sign and thinks it is a date. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#5
|
|||
|
|||
Syntax error in date in query expression issue
As posted above, it was the # sign that was giving the issue. I will keep
that in mind not to use # in field names anymore. Thanks so much! Al Campagna wrote: floyd33, Right off the top, get rid of the "#" in any field/object names you may have. "#" is used by Access in date designations. Let's try that first... that might just be the problem. Also, is... "syntax error in date in query expression." all you get in the message? It doesn't show part of the string that's failing? I have a macro on change of a field that sets the value of various other fields in a form, based on ID's matching. I just needed to add another [quoted text clipped - 11 lines] why would I be getting this error? Thanks! -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|