Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box to Update Even when Limittolist=Yes 1

Status
Not open for further replies.

Fahy

MIS
May 30, 2001
14
IE
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?
 
Check out this thread as it relates to the situation that you are requesting help with. I responded to this other posting with the code to do just as you asked.

thread702-483835

Let me know if you need further help. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top