I have a form that looks like a data entry form but is not. It looks like this:
The query behind the button:
What I want to happen is after the query fills the listbox, I want to double click a row and have the data from that row fill out the above text boxes
I have the following code in the double click event in a listbox:
The problem is that I don't want to load the data into the textboxes based on the key, but rather a different field, Company,
I think the problem is with this line of code:
I think it should look something like this:
Or, it's like a foreign join and you can't do that right here.
Thanks
The query behind the button:
Code:
SELECT Suspects.Suspect_ID, Suspects.[First Name], Suspects.[Last Name], Suspects.Company, Suspects.CallCompany
FROM Suspects;
What I want to happen is after the query fills the listbox, I want to double click a row and have the data from that row fill out the above text boxes
I have the following code in the double click event in a listbox:
Code:
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "ID = " & Me.SusQryResultlb
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
End If
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "ID = " & Me.SusQryResultlb
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
End If
The problem is that I don't want to load the data into the textboxes based on the key, but rather a different field, Company,
I think the problem is with this line of code:
Code:
rs.FindFirst "ID = " & Me.SusQryResultlb
I think it should look something like this:
Code:
rs.FindFirst "CallCompany = " & Me.SusQryResultlb(Somthing mysterious goes here)
Or, it's like a foreign join and you can't do that right here.
Thanks