ekohartono
asked on
Access Report w/ VB
Dim acc As Access.Application
Set acc = CreateObject("Access.Appli cation")
acc.OpenCurrentDatabase("c :\data.mdb ")
appAccess.DoCmd.OpenReport "Item Report, acPreview
appAccess.Visible = True
This code work fine but if data.mdb have database password
this code have little bit problem. My question is how
to open report with database pass in it.
Thanks
Set acc = CreateObject("Access.Appli
acc.OpenCurrentDatabase("c
appAccess.DoCmd.OpenReport
appAccess.Visible = True
This code work fine but if data.mdb have database password
this code have little bit problem. My question is how
to open report with database pass in it.
Thanks
ASKER
Thanks Emoreau
Your Code Help Me
I still Have 1 Question I hope You Don't Mind To Help Me Again.
In Crystal Report We Can Design Filter Like Code at bottom
Crystalreport1.selectionfo rmula="{it em.code} like 'EL*' and {item.Date} = date(" & year(vardate) & ","
& month(vardate) & "," & day(vardate) & ")"
That WeCan Change In Run Time So We Can Arrange Report That We Need. Can We Do It In Access Report ?
Thank You
Your Code Help Me
I still Have 1 Question I hope You Don't Mind To Help Me Again.
In Crystal Report We Can Design Filter Like Code at bottom
Crystalreport1.selectionfo
& month(vardate) & "," & day(vardate) & ")"
That WeCan Change In Run Time So We Can Arrange Report That We Need. Can We Do It In Access Report ?
Thank You
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank's Lot
Can I Do Like This ?
Acc.DoCmd.OpenReport "ReportName",acPreview,, "="item.code like 'EL*'" and item.date like '02/02/02'"
Can I Do Like This ?
Acc.DoCmd.OpenReport "ReportName",acPreview,, "="item.code like 'EL*'" and item.date like '02/02/02'"
date datatype are not working with the Like operator.
also dates must be enclosed between #
also dates must be enclosed between #
ASKER
To Emoreau
There is away to open report without open MS Access ?
Because if I use DoCmd.OpenReport I will See A Report And if i Minimize Report Window I Can Choose Tables Object So Any One Can Change My Database.
My Question At
http://devx.experts-exchange.com/jsp/qManageQuestion.jsp?ta=visualbasic&qid=20276662
Thank You
There is away to open report without open MS Access ?
Because if I use DoCmd.OpenReport I will See A Report And if i Minimize Report Window I Can Choose Tables Object So Any One Can Change My Database.
My Question At
http://devx.experts-exchange.com/jsp/qManageQuestion.jsp?ta=visualbasic&qid=20276662
Thank You
Const dbPathName = "c:\database.mdb"
Const strPassword = "PASSWORD"
Dim Acc As Object, db As Object
Set Acc = CreateObject("Access.Appli
Set db = Acc.Application.DBEngine.W
Acc.OpenCurrentDatabase dbPathName, False
Set db = Nothing
Acc.DoCmd.OpenReport "ReportName", acPreview
Set Acc = Nothing