I want to create a combo box within my form that is record specific. In other words, not everyone has the same list of choices to choose from in the combo box. It is based on each person's category. The combo box draws its data from the [Categories] table which is linked to the [Main Personnel] table. The link is through the field [category]. simple enough, but keep getting an error message.
1) I created the combo box [cmbAwardType]
2) Selecting the combobox properties button, event tab DOES NOT HAVE an "ON CURRENT" button for this field; however, the form properties button, event tab DOES.
3) In this "On Current" property box, it has the following:
Me.cmbAwardType.RowSource = "SELECT [Award Type] from Categories WHERE [Category] = '" & Me![Category] & "'"
(if the formatting doesn't come out right, it is double quote, single quote, double quote, double quote, single quote, double quote int he code above)
4) Also after trial and error, I then posted this statement in visual basic like this:
Sub Form_OnCurrent()
Me.cmbAwardType.RowSource = "SELECT [Award Type] from Categories WHERE [Category] = '" & Me![Category] & "'"
End Sub
5) It still was giving me the error message after that action too.
Is something wrong with the code? Just trying to explore all options here.
1) I created the combo box [cmbAwardType]
2) Selecting the combobox properties button, event tab DOES NOT HAVE an "ON CURRENT" button for this field; however, the form properties button, event tab DOES.
3) In this "On Current" property box, it has the following:
Me.cmbAwardType.RowSource = "SELECT [Award Type] from Categories WHERE [Category] = '" & Me![Category] & "'"
(if the formatting doesn't come out right, it is double quote, single quote, double quote, double quote, single quote, double quote int he code above)
4) Also after trial and error, I then posted this statement in visual basic like this:
Sub Form_OnCurrent()
Me.cmbAwardType.RowSource = "SELECT [Award Type] from Categories WHERE [Category] = '" & Me![Category] & "'"
End Sub
5) It still was giving me the error message after that action too.
Is something wrong with the code? Just trying to explore all options here.