I took the next example off this site but is does not work.
Can someone tell me how to string 4 keys together to make the stlinkcriteria work. I do not know what double quotes go with what single quotes and so on.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Second Form"
stLinkCriteria = "[FirstName]=" & "'" & Me![FirstName] & "' AND [LastName] = '" & Me![LastName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "First Form"
----------------------------------------
Can someone tell me how to string 4 keys together to make the stlinkcriteria work. I do not know what double quotes go with what single quotes and so on.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Second Form"
stLinkCriteria = "[FirstName]=" & "'" & Me![FirstName] & "' AND [LastName] = '" & Me![LastName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "First Form"
----------------------------------------