E
Eric
John,
The answer is : =DLookUp("[Address]","Hotel","[Supplier] = """ & [Supplier]
& """")
however, one question, what if the "return value" is null.
i can edit the field . i.e input whatever data i want ..
Is there any solution ?!
Eric
The answer is : =DLookUp("[Address]","Hotel","[Supplier] = """ & [Supplier]
& """")
however, one question, what if the "return value" is null.
i can edit the field . i.e input whatever data i want ..
Is there any solution ?!
Eric
John W. Vinson said:John
You are wonderful
I've 2 tables - a) voucher b) hotel
i use voucher as a form where have fields - "supplier" and "address" i
want
user to input the name of supplier in "supplier" and the "address" field
will show the address of the supplier
Both data are saved in table - hotel
In other word, my sources of data is [hotel]
the field that i need to look up is " address" and it depends on the input
of "supplier"
= Dlookup("[address]","hotel","[hotel]="""&[hotel] & """)
But this is not working
I'm sorry, Eric, but this isn't making any sense at all.
You refer to fields named Supplier and Address.
Your query refers to a field named Hotel (and also to a table named
Hotel).
You say you have a table named voucher that you "use as a form". A table
is
one kind of object; a form is a different kind of object. You CAN'T "use a
table as a form".
GUESSING that you have a field named Supplier in the table named Hotel
then
=DLookUp("[Address]", "[Hotel]", "[Supplier] = """ & [something] & """")
might work. I don't know what you should put in for [something] because I
cannot see your form and do not know the context - put the name of
whatever
control on the form would identify the supplier. If supplier is a Lookup
Field
this will need more work - is it?