Minggu, 03 Juni 2012

RE: [MS_AccessPros] Syntax error Mission operator

 

Bill-

Like this:

?DLookup("[fscFscID]","t_FacilitySchedule","fscSchDate= #" &
[forms]![f_8TeamSeasonSchedule]![hlpDay1Date] & "#")

?DLookup("[fscFscID]","t_FacilitySchedule","fscStartTime= #" &
[forms]![f_8TeamSeasonSchedule]![hlpGame1Time] & "#")

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----------------

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of agent1of6
Sent: Sunday, June 03, 2012 8:51 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Syntax error Mission operator

 
I am working in the Immediate Window to test my code piece by piece. It was
working great as I am 75% of the way through and I ran into error I cannot
solve.

Why would this code work (compares location ID's)
? DLookup("[fscFscID]","t_FacilitySchedule","fscFacID=" &
[forms]![f_8TeamSeasonSchedule]![cboLocDay1]

...and this code gives me a Null return, should be 2 (Compares schedule dates)
? DLookup("[fscFscID]","t_FacilitySchedule","fscSchDate=" &
[forms]![f_8TeamSeasonSchedule]![hlpDay1Date])

...and this code gives me an error (compares start times)

? DLookup("[fscFscID]","t_FacilitySchedule","fscStartTime=" &
[forms]![f_8TeamSeasonSchedule]![hlpGame1Time])

I have tried to enter the ## but I must be getting it wrong and I can't find any
good models. How do I format Dates and times to get them to compare to each
other?

Thanks for you assistance,
Bill

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar