Buca
asked on
URGENT! SQL Query no working!??
Hi all,
I'm trying to retrieve the last set of records which were inserted into the
database. The records which are inserted include a TimeStart. This variable
is set to Now(). WHat i thought I could do is retrieve the records based on
this value, because the retrieval will be done straight after the update.
The SQL Query is:
datinfo.RecordSource = "SELECT * FROM Records WHERE (Records.TimeStart = "
&frmL0S1.TStart& ")"
Records.TimeStart is the field where the time is inserted.
frmL0S1.TimeStart stores this time, because this time was carried through a
number of forms before being inserted into the database.
Records.TimeStart is a text field
frmL0S1.TStart is declared as a date field.
I'm not sure if this would be a problem considering the update is working
fine.
I've tried placing single quotation marks around frmL0S1.TStart but that doesn't work
and also converted this to a string but that won't work either!
All help is greatly appreciated.
Thanks
C
I'm trying to retrieve the last set of records which were inserted into the
database. The records which are inserted include a TimeStart. This variable
is set to Now(). WHat i thought I could do is retrieve the records based on
this value, because the retrieval will be done straight after the update.
The SQL Query is:
datinfo.RecordSource = "SELECT * FROM Records WHERE (Records.TimeStart = "
&frmL0S1.TStart& ")"
Records.TimeStart is the field where the time is inserted.
frmL0S1.TimeStart stores this time, because this time was carried through a
number of forms before being inserted into the database.
Records.TimeStart is a text field
frmL0S1.TStart is declared as a date field.
I'm not sure if this would be a problem considering the update is working
fine.
I've tried placing single quotation marks around frmL0S1.TStart but that doesn't work
and also converted this to a string but that won't work either!
All help is greatly appreciated.
Thanks
C
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, I forgot to mention that frmL0S1 in the example above would hold '4/12/02 12:00:00 PM' and should probably be a text field rather than a date field.
ASKER
Thank you so much
much appreciated
much appreciated
ASKER
Thank you so much
very much appreciated
very much appreciated