G
Guest
Hi,
I have a function which uses a variable called "qrySort" to concatenate the
sort order for a search query I've created. I am trying to apply this to my
form using:
forms![Main]![Contact].form.OrderBy = "(my qrySort variable)"
Problem is I don't know how to pass the variable using the right syntax or
if this is even possible. I've tried " & qrySort & " but that doesn't work.
It seems like .OrderBy takes whatever is in the " marks literally and doesn't
consider the variable value.
Is there some way to do this? I know I can do it with the form's
RecordSource property but I'm trying to use a Filter instead which would
require setting the OrderBy property.
Man I wish Access Help did a better job of explaining these things.
Thanks,
Bill
I have a function which uses a variable called "qrySort" to concatenate the
sort order for a search query I've created. I am trying to apply this to my
form using:
forms![Main]![Contact].form.OrderBy = "(my qrySort variable)"
Problem is I don't know how to pass the variable using the right syntax or
if this is even possible. I've tried " & qrySort & " but that doesn't work.
It seems like .OrderBy takes whatever is in the " marks literally and doesn't
consider the variable value.
Is there some way to do this? I know I can do it with the form's
RecordSource property but I'm trying to use a Filter instead which would
require setting the OrderBy property.
Man I wish Access Help did a better job of explaining these things.
Thanks,
Bill