indesisiv
Access - What's that?
- Local time
- Today, 15:40
- Joined
- Jun 13, 2002
- Messages
- 265
Hi there.
I am trying to use an SQL query in a report but i can't seem to get it to work. The query itself works but i can't seem to get it to work as i put it into the string.
The problem is getting the correct number of " in the format statements.
Any help please!!!
I am trying to use an SQL query in a report but i can't seem to get it to work. The query itself works but i can't seem to get it to work as i put it into the string.
The problem is getting the correct number of " in the format statements.
Any help please!!!
Code:
strSQL = "SELECT tblVenue.VenueID, tblVenue.VenueName, Format([VenueDate],"Long Date") AS VenueDates, tblVenue.VenueTime, tblVenue.PCT, tblVenue.SpecialistName, tblVenue.MaxClients, Count(tblClient.VenueID) AS CountOfVenueID, [MaxClients]-[CountOfVenueID] AS SpacesLeft "
strSQL = strSQL & "FROM tblVenue LEFT JOIN tblClient ON tblVenue.VenueID = tblClient.VenueID"
strSQL = strSQL & "GROUP BY tblVenue.VenueID, tblVenue.VenueName, Format([VenueDate],"Long Date"), tblVenue.VenueTime, tblVenue.PCT, tblVenue.SpecialistName, tblVenue.MaxClients "
strSQL = strSQL & "ORDER BY tblVenue.VenueName, Format([VenueDate],"Long Date");"