A family of Microsoft relational database management systems designed for ease of use.
Oh this explains it thank you again!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
this code works however if there is a duplicate last name it goes to the first entry rather than the last entry
Private Sub Text117_DblClick(Cancel As Integer)
DoCmd.OpenForm "tblReport", acNormal, , "[Last Name] = '" & Me![Last Name] & "'"
End Sub
So I try to specify by the unique ID that is assigned to each entry. I put this code in MS Access 2016, to select the specific ID. I'm not sure why I get a "Run-time error '3464': Data type mismatch in criteria expression.
Private Sub ID_DblClick(Cancel As Integer)
DoCmd.OpenForm "tblReport", acNormal, , "ID = '" & Me![ID] & "'"
End Sub
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Oh this explains it thank you again!
Thank you that solved the problem! why is that? if you can break it down for me? or send me a link because I was reading something along the lines of if it is a number there is a difference but I still don't know why.
I should have added that dates would use:
DoCmd.OpenForm "tblReport", acNormal, , "[StartDate] = #" & Me!txtStartDate & "#"
Numbers don't require delimiters like quotes and #.
If ID is a number then you need to use:
DoCmd.OpenForm "tblReport", acNormal, , "ID = " & Me![ID]