Darren DICK
d.dick at uws.edu.au
Sun Sep 5 22:35:54 CDT 2004
Hello all
I'm having a little trouble with the syntax of an append SQL string
I am setting a string value in code based on a booking ID
I want to iterate through all the bookings - get the bookingID
and then Append it to a table.
Pretty basic, but I can never get the correct 'encasing' of the
coded value right. EG where to use quotes, where to use ampersands etc.
The code snip below is all cool except for the bit in the SQL where it is
putting the coded value into the relevant field in the table, IE after the
SELECT portion
of the SQL
Can anyone tidy this up for me?
Many thanks in advance
Dim strMyValueAsAString as string
strMyValueAsAString = Me.BookingID
appSQL = "INSERT INTO tblMyBookings ( BookingIDFromBookingsTable
) " _
& "SELECT " & strMyValueAsAString & " FROM tblMyBookings ;"
Have a great day
Darren