Okay, I've been spinning my wheels for a while on something that I'm sure is probably quite simple.
I have multiple tables, each of which has two fields -- a code and its description. Each table houses a different type of code. For example, tbl_State associates a state code (say, IL) to a state description (Illinois) and tbl_Country where there is a country code associated to the name of the country.
I have two forms. Let's call them frm_SelectCodeType and frm_CodeList. The first form, frm_SelectCodeType, includes an option group. Each option identifies one of the code tables. The other form, frm_CodeList, is a generic list-type form to display the records in a selected table. This form includes the code field and the description field.
When an option from frm_SelectCodeType is selected, I want to open frm_CodeList, where a label caption is changed to identify the table type (i.e. "State" vs. "Country") and the recordsource is changed to grab the data from the appropriate table.
I was trying to create code using the Select Case and interrogating the option value. However, I'm not sure where to put the VBA code -- in a button click event procedure frm_SelectCodeType to open frm_CodeList or in a form open event procedure on frm_CodeList. I also don't know how to properly code this.
PLEASE HELP!!
I have multiple tables, each of which has two fields -- a code and its description. Each table houses a different type of code. For example, tbl_State associates a state code (say, IL) to a state description (Illinois) and tbl_Country where there is a country code associated to the name of the country.
I have two forms. Let's call them frm_SelectCodeType and frm_CodeList. The first form, frm_SelectCodeType, includes an option group. Each option identifies one of the code tables. The other form, frm_CodeList, is a generic list-type form to display the records in a selected table. This form includes the code field and the description field.
When an option from frm_SelectCodeType is selected, I want to open frm_CodeList, where a label caption is changed to identify the table type (i.e. "State" vs. "Country") and the recordsource is changed to grab the data from the appropriate table.
I was trying to create code using the Select Case and interrogating the option value. However, I'm not sure where to put the VBA code -- in a button click event procedure frm_SelectCodeType to open frm_CodeList or in a form open event procedure on frm_CodeList. I also don't know how to properly code this.
PLEASE HELP!!