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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Option button to table

Status
Not open for further replies.

LKB6

MIS
Mar 20, 2009
23
US
I have one form with an Option group. The form and data are linked to a table (A). I select one item, and need to choose one of the option button.

In the Option group I would like to put a number of buttons representing the content of another table (B), as if it was a combobox. When user select one button the result will be recorded in a field in Table (A)

My problem is to create the option buttons, and to keep the value in memory to preset the value when I go to the record.

Can I do this?

Thanks in advance
 
Can you explain "...content of another table (B),..."?

Will this content vary based on the record values in table A?

Are there always the same number of options?

Are the values you want to store in table A numeric or string?

Duane
Hook'D on Access
MS Access MVP
 
Can you explain "...content of another table (B),..."?'
The list of the options is in anther table. Option1, 2, etc 10 total.

Will this content vary based on the record values in table A?
NO


Are there always the same number of options?
YES

Are the values you want to store in table A numeric or string?
String such as 'Blue', 'Pink'
 
An option group can only be bound to a numeric field. Your best bet would be to add a numeric field to table B and number them 1-10. Then just store the number in table A.

If you can't do this, you will need to add code to your form that converts the Blue, Pink etc to a number to set the value of the option group. Additional code will be need in the after update of the option group to set the proper text/string value in your field in table a.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top