You cannot use variables that way. The query is just TEXT and does not resolve the value of the variable.
AND fk_recordID = " & thisRecord & " ...
Sent from miPhone
Thanks for jumping on board Beverly. I don't get the point, however. How should I structure the final parameter?
1 of 1 people found this helpful
? is used for parameter.
AND fk_recordID = ?"
; "" ; "" ; thisRecord )
Got it! (at least, I've got it working as required now. "Got it" as in understanding might take a little more practice)
Many thanks both.
Using the parameter is best. And because you are using the parameter, the
could be the parameter value (no need to set to local variable)
I was pointing out that the Query (TEXT) can be like any other Literal-Plus-Dynamic value
"something " & table::field & "something else " & myVariable & "the end"
Your variable was not being evaluated just by putting the name of that variable as a literal into the query string.
just a small observation: I would not use the word "list" but maybe "myList". Depending on what's in your Let, you might get an error sooner or later.
Good point, thanks. I normally name Let variables otherwise—usually use theXxxx, so in this case theList. Don't know why I didn't this time.