SQL Update

D

Darrell

All:

I have been trying for a couple of hours to troubleshoot this UPDATE
statement and have been unsuccessful. I read a couple of earlier posts
addressing this issue, and I still can't find the proverbial fly in the
ointment.

string = "UPDATE Table SET DateField = '2006-11-10', " & _
"TextField = 'TextValue' " & _
"WHERE Table.FieldName = 'TextCriteriaValue'"
DoCmd.RunSQL (string)

All data at this point is hard coded, so it should be very straightforward.

Thanks for any and all help.

Darrell
 
D

Darrell

Darrell said:
All:

I have been trying for a couple of hours to troubleshoot this UPDATE
statement and have been unsuccessful. I read a couple of earlier posts
addressing this issue, and I still can't find the proverbial fly in the
ointment.

string = "UPDATE Table SET DateField = '2006-11-10', " & _
"TextField = 'TextValue' " & _
"WHERE Table.FieldName = 'TextCriteriaValue'"
DoCmd.RunSQL (string)

All data at this point is hard coded, so it should be very straightforward.

Thanks for any and all help.

Darrell

Addendum:
The docmd.runsql is prompting for the field names as though they are
parameters.
I am actually working with linked SQL tables in a SQL backend. Does this
make a difference?
I have run the syntax in Query Analyzer in SQL Server and it runs perfectly.
Let's see... what else? The record that will be updated is open in the
form that calls this update.

I can't think of anything else.

Darrell
 
Top