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.
All suggestions are welcome.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, to quick !
/pgg
/pgg
Apology accepted.. Well done pgg.. <smile>
pgg changed the proposed answer to a comment
ASKER
Thanks very much wsh2.
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