Wrong Field Value Being Retrieved

stew561

Registered User.
Local time
Today, 13:59
Joined
Sep 7, 2005
Messages
19
Hello All,

I’m having a problem getting the correct value from a form. I have a table name CITY.

Table: CITY

Field(s): [City_ID] [City Name]
1 Boca Raton
2 West Palm Beach
3 Sunrise
4 Palm Bay


My form uses the city table as a drop down look-up field. In the form it show’s up correctly by showing the City Name only.

The problem is that I have a command button that looks up the city in the form as part of an address lookup for Mapquest, but the value it retrieves is the numeric City_ID and not the City Name. How can I fix it to see the correct column?
 
To reference the second column in a combo box:

If referred to via code on the actual form the combo box is on:
Code:
Me.YourComboBoxName.Column(1)

If referred to via code outside of the actual form the combo box is on:
Code:
Forms!YourFormName.YourComboBoxName.Column(1)
 
Thanks I'll try it and let you know how it went
 
The first formula worked great!

Thanks so much for you help!
 

Users who are viewing this thread

Back
Top Bottom