Here is a little snippet of code I wrote to speed up my data entry.
Private Sub cboName_GotFocus()
If Me!CheckBoxName = True Then
Me!cboName.RowSource = "Query1"
Else: Me!cboName.RowSource = "Query2"
End If
End Sub
This snippet allows me to enter data from different tables when needed. A checkbox value determines which Query is used for the ComboBox.
One Query inserts lists names from my "Members" table and another from my "Prospects" table. My checkbox indicates if a Member's spouse is also a Member. If not, the spouse is a "Prospect". I suppose this could be also used with an Option Group, Value List, or a ComboBox and "Case 1, Case 2, etc. There could be a number of other possible uses for this snippet.