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!

Error in the table part of a Dlookup string

Status
Not open for further replies.

Xenocide

Programmer
Jan 20, 2005
76
CA
Hi

I'm having an error in this string

Depense2 = DLookup("Sum(Depense)", "[C:\Documents and Settings\schiasson\Bureau\bd2].[" & Me!lst3.Column(0) & "]", "Maitre= IdEngagementA AND IdEngagementA <> '01-000000-BU'")

The error is being cause by this part
"[C:\Documents and Settings\schiasson\Bureau\bd2].[" & Me!lst3.Column(0) & "]"

I know the directory is the good one cauz I used the exact same string in a select and it work.

I tried a couple of things but still have the error
can somebody help me?
 
Hi,

If [" & Me!lst3.Column(0) & "]" is a string, try adding single quotes or Chr(34) - double quote.

['" & Me!lst3.Column(0) & "']"
[" & Chr(34) & Me!lst3.Column(0) & Chr(34) & "]"

Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top