[Htl_address] needs to be in double quotes
Any idea ?!
OK so Hotel is a text value, not an ID (i.e. a number)
So try "Hotel='" & me.Hotel & "'"
If that doesn't work is the spelling correct for Htl_address? and does the table contain fields called address and hotel?
Also, is the control where the hotel is typed called Hotel? and not txtHotel or something else?
Otherwise it would appear that your field Hotel in Htl_Address is a lookup field - which displays text but stores a number (the ID)
Ajax
Can you help me out , i still unable to solve the problem
I tried to find the hotel address from htl_address form or
table in the Query.
addlookup("add","htl_address", "add='&[address])
But fail.
Any where i did wrong?!
Eric
There is no Hotel_vhr report in that db.
The Hotel field in Update_25_11 is a text type. It should be a number type and save the ID from Htl_address.
Then build query that joins tables.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June 7
The Hotel field in htl_addresss and the Update_25_11 are all in Text type, as it is for hotel name ..
i tried to link the Hotel field of both update25 and htl_address , it links
But i want to do it in Dlookup, it seems to be that Dlookup i have some syntax error that i am unclear
Can you help to correct me ?
Should not be saving the hotel name, should be saving the hotel ID.
Regardless, DLookup() is the least efficient method to pull related data. Domain aggregates can perform slowly in query and textbox. Why don't you just build a query that joins the two tables and use that as the report RecordSource?
Dlookup("address", "htl_address", "Hotel='" & [Hotel] & "'")
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
fort some reason the OP keeps changing names - there is not a field called 'add'
Thanks Ajax. I meant to use "address", edited my post.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.