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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent: VB runtime error SQL 3

Status
Not open for further replies.

RubenV

Programmer
Feb 17, 2005
34
BE
Hi everyone,

when I launch my app I get this runtime error:

runtime error '-2147217900 (80040e14)'
ODBC syntax error

This is the select command:
SELECT re.desc, c.Name as Company
FROM Client c, Related_Entries re
WHERE re.Related_From_Id = '" & strID & "'
ORDER BY c.Name;

If I leave re.desc out of it, it's ok.
Yet, the name of the field re.desc is correct.

Does anyone have some clues.
It's very urgent...

here is the code:
dcRltdCompanies.RecordSource = strSearchRltdCompanies
dcRltdCompanies.CursorLocation = adUseClient
dcRltdCompanies.LockType = adLockOptimistic
dcRltdCompanies.Refresh

It happens when doing the .Refresh command.
So it happens when executing the query...

I really hope someone can be of any help to me.

Regards,
Ruben
 
Strange...

I recreated the form, just copy pasted the components and the code and it worked...

Just VB having a difficult time then?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top