I cant remember the syntax is the data is a number. Below is if the data is
text.
I wish this site kept my older posts I know I have asked this before.
stLink = "[OrderNum]=" & "'" & Me![OrderNum] & "'"
Just lose the extra quotes.
Date/Time fields must use # as a delimiter.
Text fields can use either " or ' as a delimiter.
Number and Currency fields use no delimiter at all.
stLink = "[OrderNum] = " & Me![OrderNum]
will work.
Note that you don't have to break out the leading ' delimiter for text fields;
it's just a character in the " delimited string constant, like = or ] or any
other character. You could (for text fields) use
stLink = "[OrderNum] = '" & Me![OrderNum] & "'"
Note also that if the string you're using might contain an apostrophe, you
shouldn't use ' as a delimiter since the apostrophe will be seen as a
premature closing quote. You can use " in a string by doubling it up - two
consecutive doublequotes in a doublequote delimited string will be translated
to a single doublequote (yes, I know, doubletalk):
stLink = "[LastName] = """ & Me!txtLastName & """"
will allow for a construct like
[LastName] = "O'Reilly"