DLookup

  • Thread starter Thread starter GLT
  • Start date Start date
G

GLT

Hi,

I have the following line in VBA code:

strPath = Dir$(DLookup("fldImportDirectory", "tbl00_dbSettings"))

If I hover my mouse over the above during a debug, then strPath = the
correct path. However when I run the above, and display strPath in a message
box, its blank.

I am trying to get strPath to equial a value stored in a table.

Can anyone advise the correct way to get the above working?

Any assistance is always greatly appreciated...

Cheers,
GLT.
 
Why did you add the Dir$() to the Dlookup??? The dlookup will return the
value you seek.

strPath = DLookup("fldImportDirectory", "tbl00_dbSettings")
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

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

Back
Top