W
Wendywo
Hi,
I've been reading a past post "Passing a Variable As Query Criteria" Ofer -
Can anyone explain this a bit further. I'm afraid I'm not very good with
functions and always get a bit lost on this.
The original response was:
"You can create a Function that return the value of the variable, and use
this
function in the query
Global VarName as Double
Function FunctionName () as Double
FunctionName = VarName
End Function
Both, function and variable should be defined in a module, and not in a form
or report"
I have done this, but how do you call the Variable/function from the query
itself?
Basically I want to create an append query which will write multiple records
based upon a single value which I have stored from a previous form.
So the query would be something like:
Selected, PupilID, ExamID:[Variable] (it's this last bit I can't quite get).
Thanks for any help in advance.
Wendy
I've been reading a past post "Passing a Variable As Query Criteria" Ofer -
Can anyone explain this a bit further. I'm afraid I'm not very good with
functions and always get a bit lost on this.
The original response was:
"You can create a Function that return the value of the variable, and use
this
function in the query
Global VarName as Double
Function FunctionName () as Double
FunctionName = VarName
End Function
Both, function and variable should be defined in a module, and not in a form
or report"
I have done this, but how do you call the Variable/function from the query
itself?
Basically I want to create an append query which will write multiple records
based upon a single value which I have stored from a previous form.
So the query would be something like:
Selected, PupilID, ExamID:[Variable] (it's this last bit I can't quite get).
Thanks for any help in advance.
Wendy