A
Asib
Hello all, I am in need of some assistance. I have 2 combo boxes on my form.
Both are bound to fields. I am useing the following code to limit the second
combo to the records associated with the selection in the first.
This is in the after update event of the First combobox,
On Error Resume Next
cboSub.RowSource = " SELECT DISTINCT ItemMaster.Sub " & _
" FROM ItemMaster " & _
" WHERE ItemMaster.ItemNumber = '" & cboItemNumber.Value & "'" & _
" ORDER BY ItemMaster.Sub;"
Everything works as it should except that i need to get rid of null values
in the second combobox. I need to see that there is data in the [sub] field
to choose from when entering data. I also have this code in the on focus
event of the second combobox.
Me.cboSub = Me.cboSub.ItemData(0)
If i change it to (1) it gets me what i need except when there are not nulls
in the [sub] field.
Any and all assistance is greatly appreciated.
Thank you, Asib
Both are bound to fields. I am useing the following code to limit the second
combo to the records associated with the selection in the first.
This is in the after update event of the First combobox,
On Error Resume Next
cboSub.RowSource = " SELECT DISTINCT ItemMaster.Sub " & _
" FROM ItemMaster " & _
" WHERE ItemMaster.ItemNumber = '" & cboItemNumber.Value & "'" & _
" ORDER BY ItemMaster.Sub;"
Everything works as it should except that i need to get rid of null values
in the second combobox. I need to see that there is data in the [sub] field
to choose from when entering data. I also have this code in the on focus
event of the second combobox.
Me.cboSub = Me.cboSub.ItemData(0)
If i change it to (1) it gets me what i need except when there are not nulls
in the [sub] field.
Any and all assistance is greatly appreciated.
Thank you, Asib