Dlookup problem

  • Thread starter Thread starter Ray
  • Start date Start date
R

Ray

Cannot get dlookup to work, although I have in the past.
Set up a test bed of two unrelated tables.
Looked up the key in one table using a combo box and
updated the value in the form using the table
Keep getting run time error 2465 can't find field "I"

Me.[F1] = DLookup([F1], [Table1], [Table1].[Key] = [LKUP])

In debug F1 in form green is correct
F1 in dlookup blue is correct
LKUP CAR is correct
It has found the correct field and I am trying to change
green to blue but still keep getting this error
 
Ray,

Syntax problem. Try:

Me.[F1] = DLookup("[F1]", "Table1", "[Table1].[Key] = ' " & [LKUP] & " ' ")

if the Key field is text, or

Me.[F1] = DLookup("[F1]", "Table1", "[Table1].[Key] = " & [LKUP])

if the Key field is numeric.

HTH,
Nikos
 
Thank you, Ray(novice)

-----Original Message-----
Ray,

Syntax problem. Try:

Me.[F1] = DLookup("[F1]", "Table1", "[Table1].[Key] = ' " & [LKUP] & " ' ")

if the Key field is text, or

Me.[F1] = DLookup("[F1]", "Table1", "[Table1].[Key] = " & [LKUP])

if the Key field is numeric.

HTH,
Nikos

Ray said:
Cannot get dlookup to work, although I have in the past.
Set up a test bed of two unrelated tables.
Looked up the key in one table using a combo box and
updated the value in the form using the table
Keep getting run time error 2465 can't find field "I"

Me.[F1] = DLookup([F1], [Table1], [Table1].[Key] = [LKUP])

In debug F1 in form green is correct
F1 in dlookup blue is correct
LKUP CAR is correct
It has found the correct field and I am trying to change
green to blue but still keep getting this error


.
 

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

DLookup Syntex error it is killing me 7
Dlookup in table won't work 2
Dlookup on form - help please 2
DLookup 2
dlookup formula in Form 5
DLookUp syntax 9
DLookup Issue 9
DLookup 4

Back
Top