Problem Layout:
I have a "Form" and inside this form i have a "Subfrom" and a "List Box".
In the "Subfrom", i have an event action for "Dbl Click" the purpose of it is that when the user double click on a row from the records in the "Subform",, that record will be pasted in the the List Box Below.
I created the "List Box" from the Design Menu and than clicked cancel to not bound it to any table for it to be empty and not show anything until i selected a record from the "Subfrom".
Thats My VBA:
"
Private Sub Form_DblClick(Cancel As Integer)
Dim selectedID As Long
Dim strSQL As String
' Check if an item in the Subform is selected
If Not IsNull(Me.ID.Value) Then
selectedID = Me.ID.Value
' Build the SQL statement to select the record
strSQL = "SELECT * FROM Assets_Tasks WHERE ID = " & selectedID
' Add the selected record to the list box
Me.Selected_Tasks.AddItem strSQL
End If
End Sub
"
General Problem:
Im getting an error that the Method or data member not found for the list box "Selected_Tasks", The name "Selected_Tasks" i got it from selecting the The List box from design view -->Name Property
I have a "Form" and inside this form i have a "Subfrom" and a "List Box".
In the "Subfrom", i have an event action for "Dbl Click" the purpose of it is that when the user double click on a row from the records in the "Subform",, that record will be pasted in the the List Box Below.
I created the "List Box" from the Design Menu and than clicked cancel to not bound it to any table for it to be empty and not show anything until i selected a record from the "Subfrom".
Thats My VBA:
"
Private Sub Form_DblClick(Cancel As Integer)
Dim selectedID As Long
Dim strSQL As String
' Check if an item in the Subform is selected
If Not IsNull(Me.ID.Value) Then
selectedID = Me.ID.Value
' Build the SQL statement to select the record
strSQL = "SELECT * FROM Assets_Tasks WHERE ID = " & selectedID
' Add the selected record to the list box
Me.Selected_Tasks.AddItem strSQL
End If
End Sub
"
General Problem:
Im getting an error that the Method or data member not found for the list box "Selected_Tasks", The name "Selected_Tasks" i got it from selecting the The List box from design view -->Name Property