How do I move data between variables and queries?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a global variable "xxxx" and want to reference its value in the
criteria of a query. I was thinking of;

Like '*' & [forms]![CloseItem].[xxxx].[value]

I also have a different variable "yyyy" and want to set its value to the
result of a single field from a query. I was thinking of;

DoCmd.OpenQuery "someQuery"
yyyy = queries!someQuery!FieldName
 
Create a Global Function that return the variable
Function aaaaa()
aaaaa="xxxx"
End Function

and now you can call your function in your query and get
the value of "xxxx"
 
Back
Top