user1804254
user1804254

Reputation: 59

Access forms Lookup

I have been working with Access 2010 and creation of forms.

I have a table1 and related form1.
I have another table2 with values for yes,no and missing (lookupyesnomissing).

I want a particular field in the form1 to show the options "Yes", "No" and "Missing". I also want the same field to be stored as 0,1,or -1 in the table( 0-No, 1-Yes, -1 Missing, --- lookupyesnomissing table values).

I am not able to have different values for same field in 2 places form and table. I either should have both as numbers or both as text.

Please help me out.

Upvotes: 1

Views: 3747

Answers (1)

McGarnagle
McGarnagle

Reputation: 102753

You can include multiple columns in your combo box, but bind its selected value to a field in the current form. Just set its properties correctly.

  1. Make sure the RowSource query is correct, and pulls both columns from table2.
  2. Set ColumnCount to 2 (or however many you want to display, plus 1).
  3. Set the ColumnWidths to 0;1 (ie, hide the first column, I'm assuming that the first column is the value that you want to bind to)
  4. Set the BoundColumn to 0 (bind it to the first column in the data set)
  5. Finally, set the bound field property to the field in the form's data source that you want to bind to

Upvotes: 1

Related Questions