table variable lookup

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

Guest

Can i set a table field to gets its value from a public module variable in
access?
 
You can create a query that include all the fields from
the table + another field that based on a function that
return tha value of the variable.

"Select *.MyTable, GetVar() as MyVar from MyTable"

function GetVar()
GetVar=MyPubVar
end function
 
The function is created in a module
function GetVar()

GetVar=MyPubVar
end function

and the SQL in a query
"Select *.MyTable, GetVar() as MyVar from MyTable"
 
still can't get it work

Ofer said:
The function is created in a module
function GetVar()

GetVar=MyPubVar
end function

and the SQL in a query
"Select *.MyTable, GetVar() as MyVar from MyTable"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top