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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to look at Access data from Excel? 1

Status
Not open for further replies.

tatochka

Programmer
May 3, 2001
49
US
I have VBE application and need to look at some data at Access database. I tried to use ADO, but didn't succeed. The text box control doesn't even have a datasource property in VBA. Does anybody have any ideas? I need to check the value of one of the field in Access and depending on its value my application goes.
 
this code may work:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sSQL As String

Set db = OpenDatabase("c:\PATH\???.mdb")
sSQL = "select * from TABLE"
Set rs = db.OpenRecordset(sSQL)
rs.MoveLast
rs.MoveFirst
TextBox1.Text = rs.Fields(0) Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top