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

DSum With Visual Basic

Status
Not open for further replies.

edderic

Programmer
May 8, 1999
628
Hello,

i open and run a Access report from Visual Basic :

Public Sub ToonVanDatum()
Dim sVanDatum As Date
Dim sTotDatum As Date
On Error GoTo fout
sVanDatum = FormatDateTime(DTPvanDatum.Value, vbShortDate)
sVanDatum = Format(sVanDatum, "mm,dd,yyyy")
sTotDatum = FormatDateTime(DTPtotDatum.Value, vbShortDate)
sTotDatum = Format(sTotDatum, "mm,dd,yyyy")
Set ac = New Access.Application
ac.OpenCurrentDatabase App.Path & "\Cycle.mdb"
ac.DoCmd.Maximize
ac.DoCmd.OpenReport &quot;Kasboek&quot;, acViewPreview, , &quot;DatumCorrectie >=#&quot; & sVanDatum & &quot;#&quot; & &quot; And DatumCorrectie <=#&quot; & sTotDatum & &quot;#&quot;
ac.DoCmd.RunCommand acCmdZoom100
ac.Visible = True
Exit Sub
fout:
Set ac = Nothing
End Sub

I will no the access function DSum on the Where connections !?

acc.DSum etc... Where &quot;DatumCorrectie < #&quot; & sVanDatum & &quot;#&quot;

ho fix ik that?

Thanks

Belgium programmer.

Eric De Decker
eric.de.decker@pandora.be

 
its not the same question !

i open a report with access automation and not whit DAO.

Eric De Decker
eric.de.decker@pandora.be

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top