Verify that [forms]![Selection]![prgrm] returns the value in the control.
Enter something in the control (remember to press the Enter key after putting
in a value). Then open the form where the combo box resides. If the two are
in the same form, requery the combo box after the input control is updated:
DoCmd Me.ComboBox.Requery
If [forms]![Selection]![prgrm] doesn't return anything, check the name of the
form and the control. You can also verify this by entering something in the
control, then typing Crtl+g. In the results pane (bottom) of the programming
window, type ?[forms]![Selection]![prgrm]. It should return what is in the
control.
The query I supplied assumes that the field [Program] is a text field. If it
is a numerical field, remove the single quotes in the expression. Also, this
might be failing if you are working with subforms. If the input control is
in a subform, it needs to be referenced differently.
(E-Mail Removed) wrote:
>That leads to an empty combo box. I am open to suggestions. I believe
>it is passing the value & [forms]![Selection]![prgrm] & instead of what
>that value should represent (i.e. the value in the text box prgrm).
>
>> Try this:
>>
>[quoted text clipped - 17 lines]
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/For...ccess/200611/1
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1