T
Tom
Ladies and Gents
I live in Australia and am developing an Access database which
hopefully will have international appeal. So we come to the subject of
US date conversion.
The following SQL code is used to within calculations. Hopefully it is
self explanatory:
INSERT INTO tblPirepsReliability1 ( ClientID, AircraftTypeID,
ATAChaptID )
SELECT tblAircraftReliability1.ClientID,
tblAircraftReliability1.AircraftTypeID,
tblAircraftReliability1.ATAChaptID
FROM tblAircraftReliability1
WHERE (((tblAircraftReliability1.PIREPDate) Between #" &
Format(Me.DateFrom, "mm\/dd\/yyyy") & "#
And #" & Format(Me.DateTo, "mm\/dd\/yyyy") & "#))
GROUP BY tblAircraftReliability1.ClientID,
tblAircraftReliability1.AircraftTypeID,
tblAircraftReliability1.ATAChaptID
HAVING (((tblAircraftReliability1.ClientID)=" & intClientID & ")
AND ((tblAircraftReliability1.AircraftTypeID)=" & intAircraftTypeID &
")
AND ((tblAircraftReliability1.ATAChaptID)>0));
I have read everything in sight including Allen Browne's essay on the
subject and have moved the # sign around as displayed on variations.
The result is always the same "syntax error" in the "DateFrom" part.
Interestingly the code won't run the first time but hit the same
action button again on the form on which the code resides and all is
well.
BTW I am not strong in SQL or VBA coding so a bit of detail would be
appreciated.
Your advice please
I am not strong
I live in Australia and am developing an Access database which
hopefully will have international appeal. So we come to the subject of
US date conversion.
The following SQL code is used to within calculations. Hopefully it is
self explanatory:
INSERT INTO tblPirepsReliability1 ( ClientID, AircraftTypeID,
ATAChaptID )
SELECT tblAircraftReliability1.ClientID,
tblAircraftReliability1.AircraftTypeID,
tblAircraftReliability1.ATAChaptID
FROM tblAircraftReliability1
WHERE (((tblAircraftReliability1.PIREPDate) Between #" &
Format(Me.DateFrom, "mm\/dd\/yyyy") & "#
And #" & Format(Me.DateTo, "mm\/dd\/yyyy") & "#))
GROUP BY tblAircraftReliability1.ClientID,
tblAircraftReliability1.AircraftTypeID,
tblAircraftReliability1.ATAChaptID
HAVING (((tblAircraftReliability1.ClientID)=" & intClientID & ")
AND ((tblAircraftReliability1.AircraftTypeID)=" & intAircraftTypeID &
")
AND ((tblAircraftReliability1.ATAChaptID)>0));
I have read everything in sight including Allen Browne's essay on the
subject and have moved the # sign around as displayed on variations.
The result is always the same "syntax error" in the "DateFrom" part.
Interestingly the code won't run the first time but hit the same
action button again on the form on which the code resides and all is
well.
BTW I am not strong in SQL or VBA coding so a bit of detail would be
appreciated.
Your advice please
I am not strong