GRM-kenyette
Miss Kenyette
- Local time
- Today, 11:48
- Joined
- Mar 10, 2005
- Messages
- 15
combobox help
hi all
i created a form from a table with 3 columns . I have a combo box on my form that is populated from column 1, and a textbox that is populated from column 2 when you choose a record from the combobox but the third textbox keeps generating an error - runtime error 94 invalid use of a null
here is the code im using
Private Sub cboAcctName_Click()
Dim strPopulateTextbox As String
Dim strPopulateTextbox2 As String
lblAcctName.Caption = cboAcctName.SelText
'populates the account number textbox with the chosen account name
strPopulateTextbox = cboAcctName.Column(1)
txtAcctNumber.Value = strPopulateTextbox
'populates the phonenumber as well
strPopulateTextbox2 = 0
strPopulateTextbox2 = cboAcctName.Column(2)
PHONENUMBER.Value = strPopulateTextbox2
End Sub
any help is greatly appreciated
thankz
hi all
i created a form from a table with 3 columns . I have a combo box on my form that is populated from column 1, and a textbox that is populated from column 2 when you choose a record from the combobox but the third textbox keeps generating an error - runtime error 94 invalid use of a null
here is the code im using
Private Sub cboAcctName_Click()
Dim strPopulateTextbox As String
Dim strPopulateTextbox2 As String
lblAcctName.Caption = cboAcctName.SelText
'populates the account number textbox with the chosen account name
strPopulateTextbox = cboAcctName.Column(1)
txtAcctNumber.Value = strPopulateTextbox
'populates the phonenumber as well
strPopulateTextbox2 = 0
strPopulateTextbox2 = cboAcctName.Column(2)
PHONENUMBER.Value = strPopulateTextbox2
End Sub
any help is greatly appreciated
thankz
Last edited: