Data Access

  • Thread starter Thread starter miaplacidus
  • Start date Start date
M

miaplacidus

I would like to read the values of a field, one at a time
into a variable. Nowhere can I find instructions or sample
code to
1. Open a database
2. Open a table in the database
3. Loop through a field to read the values into a variable.

It used to be something like

Dim dbs as Database
Dim rst as Recordset
Dim Name as String
Set dbs = OpenDataBase("Administrator.mdb)
Set rst = dbs.OpenRecordSet("Employees")
For Each Record in rst

Name = rst.[Last Name].value

Other Code

Next


What Happened while I was gone?
 
See Access HELP for the "OpenDatabase" method.
By the way, "Name" is a reserved word and should NOT be used
as a variable -- you could use " Dim strName as String" instead.
---Phil Szlyk
 
Back
Top