@arnelgp in another thread of mine gave me a function that would open a form filtered to show only the specific ID information for the row I clicked on my form.
My database became corrupted and I had to re-create it and now it is not working. In the double click event of the field on my form I have the code
And I have that method coded like this
Public Function OpenNotes(pkName As String, pkValue As Variant)
Dim strWhere As String
Select Case TypeName(pkValue)
Case "String" Then
strWhere = pkName & " = '" & pkValue & "'"
Case "Integer", "Long", "Double", "Single"
strWhere = pkName & " = " & pkValue
StrWhere = pkName & " = #" & Format(pkValue, "mm/dd/yyyy") & "#"
DoCmd.OpenForm FormName:="theFormToOpen", View:=acNormal, WhereCondition:=strWhere
Now when I step thro the code, if I hover over pkName, I see
pkValue = the value of comments
it is comments for all records, not for the ID of the clicked row. What did I set-up incorrectly here in the redo?