SQL Update

  • Thread starter Thread starter Darrell
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top