Hey everyone, I've have done this before but today nothing I have tried or sourced online will work. :|
I have a datasheet form, with a field of "HouseholdID". I want to be able to click this HouseholdID field in the datasheet and have the frmHouseholds form open to that record.
Simple, right?
I have tried these two methods using my basic VBA:
Private Sub HouseholdID_Click()
Dim sWHERE As String
sWHERE = "[HouseholdID] = '" & Me.HouseholdID & "'"
DoCmd.OpenForm "frmHouseholds", acNormal, , sWHERE
End Sub
-and-
DoCmd.OpenForm "frmHousehold", ,acNormal,,"HouseholdID = " & Me.HouseholdID
Neither of these work. Both display this same error message (which is not at all helpful to me)
TLDR;
I want to open a form to a record when that record is clicked in another form.
Thanks for your help!