I have 2 combo boxes the first updates the value
selected in the second combo box; if a checkbox is ticked.
e.g.
Supplier Company is selected in cboFirst.
The checkbox is ticked if we also sell to them
and if they have never before been identified as a company we sell to
I want to automatically fill in (cboSecond)
However I also want the LimitToList=yes property so that the users cannot add
items to the combobox.
Private Sub cboFirst_LostFocus()
cboFirst.SetFocus
Dim var1 As String
var1 = cboFirst.Text
cboSecond.SetFocus
cboSecond.Text = var1
End Sub
From this I want to trigger the cboSecond NotinList event
to open a form to add purchaser details.
The notinlist procedure completes but cboSecond refuses to update.
Run-time error '2101'
stalls at line cboSecond.Text = var1.
Am I using the wrong event here or is there another way around this?
selected in the second combo box; if a checkbox is ticked.
e.g.
Supplier Company is selected in cboFirst.
The checkbox is ticked if we also sell to them
and if they have never before been identified as a company we sell to
I want to automatically fill in (cboSecond)
However I also want the LimitToList=yes property so that the users cannot add
items to the combobox.
Private Sub cboFirst_LostFocus()
cboFirst.SetFocus
Dim var1 As String
var1 = cboFirst.Text
cboSecond.SetFocus
cboSecond.Text = var1
End Sub
From this I want to trigger the cboSecond NotinList event
to open a form to add purchaser details.
The notinlist procedure completes but cboSecond refuses to update.
Run-time error '2101'
stalls at line cboSecond.Text = var1.
Am I using the wrong event here or is there another way around this?