Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden field value

Status
Not open for further replies.

quwesi

Programmer
May 2, 2008
5

I have a table with 2 columns, cityName and cityID.

I have a form with a dropdown list that takes its values from the cityName column of the table.

I have a hidden field on the form and I want its value to be the cityID based on the selected cityName in the dropdown list.

These 2 values will then be inserted into another table.

I need your help to do this.
 
Easier solution: put both cityID and cityName in the dropdown, make the width of the first column 0 so it is not visible. Now you don't have to have a hidden field that you need to keep in sync with the dropdown - both values can be read from the dropdown.

 
Hi,

how will this solution supply the cityID value to the hidden field.

I will be very happy to know.
 
Like Joe said
put both cityID and cityName in the dropdown,
Column count: 2
column widths: 0; 1"
bound column: 1

although the combo may show "New YorK" the value of the combo is the cityID.
 
I have a question related to this. I am executing a similar version as MajP described.

It was showing the "New York" value but suddenly stopped.

It is finding the correct record but won't display the data from the field I've chosen.
 
Found the answer a hotfix package from 12-18-2007 was required. Sorry for the trouble.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top