JJFernandez
Registered User.
- Local time
- Today, 03:07
- Joined
- Oct 29, 2018
- Messages
- 18
Hi all,
I'm not a power user of Access but I'm trying to accomplish something that seems easy in my mind but can't quite get it done.
I have a main form that has all of the main particulars of an 'enforcement incident'. I also have a subform that shows all of the incidents at once that I've created search boxes for in order to filter by incident type and suspect surname. It is unbound.
I would like to be able to double-click the Incident_ID of the record in the subform that I'd like to view on the main form to make edits.
I think this is what I'm trying to achieve although I keep getting a syntax error on the .FindFirst line
Private Sub Incident_ID_DblClick()
'reference the recordset of the form in which navigation is to occur
With Forms("INCIDENT REPORT FORM").Recordset
'run a findfirst against that recordset
.FindFirst "Incident_ID = " & Me.Incident_ID
'if item not found issue warning
If .NoMatch Then MsgBox Me.Incident_ID & " not found"
End With
End Sub
Any ideas what I might be missing? Btw the Incident_ID's are text as they are a combo of numbers and letters. Access 2010
Many thanks,
Jeremy
I'm not a power user of Access but I'm trying to accomplish something that seems easy in my mind but can't quite get it done.
I have a main form that has all of the main particulars of an 'enforcement incident'. I also have a subform that shows all of the incidents at once that I've created search boxes for in order to filter by incident type and suspect surname. It is unbound.
I would like to be able to double-click the Incident_ID of the record in the subform that I'd like to view on the main form to make edits.
I think this is what I'm trying to achieve although I keep getting a syntax error on the .FindFirst line
Private Sub Incident_ID_DblClick()
'reference the recordset of the form in which navigation is to occur
With Forms("INCIDENT REPORT FORM").Recordset
'run a findfirst against that recordset
.FindFirst "Incident_ID = " & Me.Incident_ID
'if item not found issue warning
If .NoMatch Then MsgBox Me.Incident_ID & " not found"
End With
End Sub
Any ideas what I might be missing? Btw the Incident_ID's are text as they are a combo of numbers and letters. Access 2010
Many thanks,
Jeremy