Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2465 Canot find the field '|'

Status
Not open for further replies.

walejo89

Programmer
Jan 28, 2005
43
US
I need to know how can I correct this problem in my code.

Here is the code

SQLsT = "UPDATE " & SearchTab & " Set [HAttachment]='" & [Attachment] & "' From " & SearchTab & _
" where [ConsultantName]='" & WholeName & "' " & ";"

when the program get to this line, it gives me the error that it cannot find the field. I dont knwo how to get that field to work please help.

Wilfer
 
And this (If Attachment is a control)?
SQLsT = "UPDATE " & SearchTab & " Set [HAttachment]='" & [Attachment] & "' WHERE [ConsultantName]='" & WholeName & "'"
Or this (If Attachment is a field)?
SQLsT = "UPDATE " & SearchTab & " Set [HAttachment]=[Attachment] WHERE [ConsultantName]='" & WholeName & "'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
you're missing a space between the ' and From

also check the spelling of your field names

--------------------
Procrastinate Now!
 
crowley -- he has proper spacing in his sql statement. he just has added invalid wording to it that PHV corrected. there is no "FROM" clause in the update syntax.

it's simply:
Code:
update table set column=value [where another_column=another_value]

PHV's code should do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top