Hi,
I'm having a problem that is really making me want to pull my hair out. I'm also new to VB so please be gentle.
Down to my problem. I have two list boxes . The first one (List4) gets it data from a query that runs after a refresh even after an update to a combo box (the different option on the comb box will result in different lists in the List4.
I have a second list box List40 that currently holds no data. What I want to do is to be able to click on items that are displayed on List4 after the combo box is selected and for them to be updated in List40 (I hope this is making sense to you).
From looking around the forum I have discovered a couple of threads that are after the same thing and wrote a small bit of code (below) but I get a sub or function not defined error. Can anyone tell me where I have gone wrong as these seams like a simple enough task for access to perform.
Thanks in advance
Private Sub List4_DblClick(Cancel As Integer)
Dim MyItems As String
Me.List40.RowSourceType = "Value List"
MyItems = RowSource(Me.List4, 1)
Me.List40.RowSource = MyItems
End Sub
I'm having a problem that is really making me want to pull my hair out. I'm also new to VB so please be gentle.
Down to my problem. I have two list boxes . The first one (List4) gets it data from a query that runs after a refresh even after an update to a combo box (the different option on the comb box will result in different lists in the List4.
I have a second list box List40 that currently holds no data. What I want to do is to be able to click on items that are displayed on List4 after the combo box is selected and for them to be updated in List40 (I hope this is making sense to you).
From looking around the forum I have discovered a couple of threads that are after the same thing and wrote a small bit of code (below) but I get a sub or function not defined error. Can anyone tell me where I have gone wrong as these seams like a simple enough task for access to perform.
Thanks in advance
Private Sub List4_DblClick(Cancel As Integer)
Dim MyItems As String
Me.List40.RowSourceType = "Value List"
MyItems = RowSource(Me.List4, 1)
Me.List40.RowSource = MyItems
End Sub