So my main form is a marketing contacts viewing form, and in this I have a subform which has a list of all contacts in the database (its a small one).
The subform is a continuous form formatted like a datasheet, so I can view essential data for multiple contacts at a time, while still allowing for button functionality and the like.
So next to each record, there is a button, which when clicked, I would like to search through the main form and open the record to view more detailed info.
I've tried this code but it's not working like it should:
Attached is a screenshot of what the continuous subform is formatted like, so you understand my issue. Thanks
The subform is a continuous form formatted like a datasheet, so I can view essential data for multiple contacts at a time, while still allowing for button functionality and the like.
So next to each record, there is a button, which when clicked, I would like to search through the main form and open the record to view more detailed info.
I've tried this code but it's not working like it should:
Code:
Private Sub ContactView_Click()
On Error GoTo Err_cmdDetails_Click
DoCmd.SearchForRecord acForm, Forms![Marketing Targets], acFirst, "[Contact ID]=" & Forms![Marketing Targets]![MarketingTargetsMulti]![Contact ID]
Exit_cmdDetails_Click:
Exit Sub
Err_cmdDetails_Click:
MsgBox Err.Description
Resume Exit_cmdDetails_Click
End Sub
Attached is a screenshot of what the continuous subform is formatted like, so you understand my issue. Thanks