Using variables in record source

  • Thread starter Thread starter Neil via AccessMonster.com
  • Start date Start date
N

Neil via AccessMonster.com

i have a global variable which i wish to use in a where statement in the
record source of the form
is this possible or do i need to change the record source in the vb code
itself

thanks in advance Neil
 
Neil said:
i have a global variable which i wish to use in a where statement in
the record source of the form
is this possible or do i need to change the record source in the vb
code itself

thanks in advance Neil

VBA variables are only accessible directly within VBA code. In a
form/report expression or in a query you first need to create a custom
function that returns the value of the variable and then use the function in
your expression or query.
 
Cheers Rick :)

Rick said:
VBA variables are only accessible directly within VBA code. In a
form/report expression or in a query you first need to create a custom
function that returns the value of the variable and then use the function in
your expression or query.
 
Back
Top