What query return save to variable

jasmin_m

New member
Local time
Today, 20:02
Joined
Jan 10, 2010
Messages
8
I have a query, it return one value and I need to save that
value in variable.
How to do it ?
 
Easy way:
Code:
variable = Dlookup("fieldname","queryname")
Not so easy way:
Code:
dim rst as recordset
dim dbs as database

set dbs = currentdb
set rst = dbs.openrecordset("queryname")

variable =rst.field(0)
 

Users who are viewing this thread

Back
Top Bottom