By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Access Project-Problem with VB code

P: 4
I am trying to create a simple form in access project with a combo box and a list box that populates the values based on the value selected from the combo box.My VB code is as follows.

Dim Evar As String
With Me
fVisible = Not IsNull(.cbo) ----cbo is the combo box
.lstAssets.Visible = fVisible ----lstAssets is the listbox
If fVisible Then
Evar=.cbo.text -----I also tried SelText
strSQL = "EXECUTE sp_testbyvar " & Evar
.lstAssets.RowSource = strSQL
.lstAssets.Visible = True
End If
End With
For some reason, when i am trying to run the form, the list box is not generating the values.I realised that the variable Evar is reading the value form Me.cbo.text(or SelText) as #Name?. I don't understand why.Any help would be greatly appreciated.
Thank you.
Dec 21 '06 #1
Share this Question
Share on Google+
1 Reply

P: 4
Well, I changed the code a little bit and now the value from the combo box is read properly.But still the list box is still not populating any values.Could somebody tell what could possible be wrong.
Dec 21 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.