Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to gather information from a record

Status
Not open for further replies.

allright

Technical User
Feb 4, 2005
3
US
Hi All,
I think i did not explain last question well enough.
i am trying to gather information from a table and a specific record. e.g.

customer table
-----------------------------------------------------------
last name dob Number street suffix city zip state...
-----------------------------------------------------------
smith Al 1/8/80 5 Sussex Ave Newark 07521 NJ ...
perez Kyle8/2/78 4 bridge St Kearny 05321 FL ..

i need to assign all fields into a var in one shot.

something like this: myvar="smith","al","1/8/80","5","Sussex","Ave","Newark","07521","NJ",.....

but not:
var1=last which is "smith"
var2=name which is "Al"
var3=dob "1/8/80"
var4=number "5"
var5=street "Sussex"
var6=suffix "Ave"

.... and so on.
There is a command in Foxpro that let you do that, but i do not what is the equivalent command in access.

in Foxpro
you just pointer to the record you want and type the code:

var myvar as variant
open database
goto 5
gather in myvar 'Put all fields in this var'



Any help would be appreciated

Thx.
 
Take a look at Recorset in the VBA help file.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top