I have a PowerPoint presentation that I want to be able to pull data from an Access query into a slide.. Ie Visitors names for that day..
I have found some sample code (below - thanks to who wrote it!) on here which does exactly that and puts it into a message box.. However, how can I get it to fill a text box on a slide instead?
Many Thanks!
Andy
---
Pulling data from Access into another MS App (via DAO)
faq707-2281
Tested in Excel. Good Luck
Private Sub CommandButton1_Click()
'In Tools / References include "Microsoft DAO 3.51"
Dim oWorkspace As DAO.Workspace
Dim oDatabase As DAO.Database
Dim oRecordset As DAO.Recordset
Set oWorkspace = DAO.CreateWorkspace("", "admin", "", dbUseJet)
Set oDatabase = oWorkspace.OpenDatabase("c:\temp\visitor.visitor mdb"
Set oRecordset = oDatabase.OpenRecordset("qryVisitor"
oRecordset.MoveFirst
While Not oRecordset.EOF
'your code here
MsgBox (oRecordset.Fields("Accno"
.Value)
'ok, go next
oRecordset.MoveNext
Wend
oRecordset.Close
oDatabase.Close
oWorkspace.Close
End Sub
---
I have found some sample code (below - thanks to who wrote it!) on here which does exactly that and puts it into a message box.. However, how can I get it to fill a text box on a slide instead?
Many Thanks!
Andy
---
Pulling data from Access into another MS App (via DAO)
faq707-2281
Tested in Excel. Good Luck
Private Sub CommandButton1_Click()
'In Tools / References include "Microsoft DAO 3.51"
Dim oWorkspace As DAO.Workspace
Dim oDatabase As DAO.Database
Dim oRecordset As DAO.Recordset
Set oWorkspace = DAO.CreateWorkspace("", "admin", "", dbUseJet)
Set oDatabase = oWorkspace.OpenDatabase("c:\temp\visitor.visitor mdb"
Set oRecordset = oDatabase.OpenRecordset("qryVisitor"
oRecordset.MoveFirst
While Not oRecordset.EOF
'your code here
MsgBox (oRecordset.Fields("Accno"
'ok, go next
oRecordset.MoveNext
Wend
oRecordset.Close
oDatabase.Close
oWorkspace.Close
End Sub
---