Link to home
Start Free TrialLog in
Avatar of onalenna
onalenna

asked on

Retrieve from access table.

How can i retrive data from tables created in access.I can write data to the tables but reading from the tables gives me a headache!!I want the data to be displayed in a form on textboxes if possible.
All suggestions are welcome.

Thanks in advance.
Avatar of pgg
pgg

Example in DAO

Dim DB as database
Dim RS as recordset
  Set DB = opendatabase("the name and path of the database")
  Set RS = DB.OpenRecordset("Select * from TABLENAME")
  Do until Rs.Eof
     From1.List1.Additem  RS!Fieldname that you want to use
     RS.MoveNext
  Loop
  RS.Close
  Set RS = Nothing

 Comments
 
 Example of select statement:
   Select * from Customers where changedby =' & UserId & '"
   Select * from TABLENAME where FIELD = CRITERIA Order By FieldName




 
ASKER CERTIFIED SOLUTION
Avatar of wsh2
wsh2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, to quick !
/pgg
Apology accepted.. Well done pgg.. <smile>
pgg changed the proposed answer to a comment
Avatar of onalenna

ASKER

Thanks very much wsh2.