Two ways:
Using a query named query1 in this example:
Contents of query1:
Code:
select [acc code] & "|" & [addresses] & "|" & [email] & "|" & [phone] as Field1 from table1
and a little bit code
Code:
dim strResult as string
dim arr() as string
strResult = dlookup("Field1","query1")
arr = split(strResult, "|")
'Number of elements
'Ubound(arr,1)
'First element
'arr(0)
'Second element
'arr(1), etc.
or you can use the method most people use:
Code:
dim rst as recordset
dim str1st as string
dim str2nd as string
set rst = currentdb.querydefs("queryname")
if not rst.eof then
str1st = rst.fields("acc code")
str2nd = rst.fields("addresses")
endif
Enjoy!