M
Michael Nol
Hi
I need to be able to display a record which is based on a selected line of a
list box.
The list box is unbound and populated from another list box using
Private Sub List0_AfterUpdate()
Me![List2].RowSource = "SELECT qry_Plant.[Product Name],
qry_Plant.PlantTypeId, qry_Plant.PlantID FROM qry_Plant WHERE
qry_Plant.PlantTypeID = '" & Me![List0] & "'"
End Sub
I then have an onclick event to search for the relevant record
Private Sub List2_Click()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PlantID] = '" & Me![List2] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
It does not seem to be finding any records
Could someone help with this??
Thanks
Michael
I need to be able to display a record which is based on a selected line of a
list box.
The list box is unbound and populated from another list box using
Private Sub List0_AfterUpdate()
Me![List2].RowSource = "SELECT qry_Plant.[Product Name],
qry_Plant.PlantTypeId, qry_Plant.PlantID FROM qry_Plant WHERE
qry_Plant.PlantTypeID = '" & Me![List0] & "'"
End Sub
I then have an onclick event to search for the relevant record
Private Sub List2_Click()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PlantID] = '" & Me![List2] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
It does not seem to be finding any records
Could someone help with this??
Thanks
Michael