Just saying Hi to everybody

cmark3257

New member
Local time
Today, 06:08
Joined
Dec 3, 2022
Messages
1
Having troubles with DLOOKUP / this what I entered
=DLOOKUP("County","CityT","CityID=" & [cityCombo9]) and in County Field I get #Name?
I have tried several different to see if I was doing something wrong. It is working on another form
it just will not work on this new one. Can anybody tell what could be wrong.

1670102577826.png
 
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

To get started, I highly recommend you read the post below. It contains important information for all new users to this forum.

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We look forward to having you around here, learning stuff and having fun!
 
First, hello and welcome to the forums.

Second, #Name as an error indicator usually means there is something wrong with one of the named items. Therefore you should verify the spelling and location of each of the four items named in the lookup - County, CityT, CityID, and cityCombo9 - because one of them is either spelled wrong or is not located where you think it is.

It is also possible, depending on where that DLOOKUP reference is made, that you need to qualify it as for example Me.[cityCombo9]

Finally, though it might not be required syntax in this case, your County and CityID references should probably be in square brackets. There will be times when you won't be able to omit the bracketing, like if there is a special character in the name. So it's a good habit to start.
 
on design view of your form, try to Rename Country textbox to anything, like txtCountry, etc.
 

Users who are viewing this thread

Back
Top Bottom