hi all,
i made a report in access first time. how can i connect this report through VB code
thanx in advance
saj
Printable View
hi all,
i made a report in access first time. how can i connect this report through VB code
thanx in advance
saj
Check This Code for using the access report at post 2 :thumb:Quote:
Originally Posted by sajankk
thank you for the reply,
unfortunately that link is not working
i have smaall code sample. after executing this code one window is blinking and leaving. acutaly iwant to print that.
here is vb code am trying,
VB Code:
Dim aAPP as access.application Set aAPP=New Access.Applicaiton aApp.visible =true aApp.OpencurrentDatabase "D:\Slip.mdb" aApp.DoCmd.OpenReport "report", acViewPreview
please help me it is quite urgent
saj
can anybody help in this regard pls
saj
Change acViewPreview to acViewNormal as the default normal view for a report is to print it.
thank u for the reply
now i can able to print ... but it is printing what all the data in the report... how can i print on criteria base. that is if i want to print with regno=1101 then what should be the code for that....
thanx
saj
i would like to explain what i did so far to get the help. I made a query in the access that contains most of the fileds from two tables. and in the designing time of the report , i select that query and insert the fields and formatted.
from vb i want to call this report and print those records which i need to print that point of time.
eg: i want to print the student details with regno... i hv a combo in VB form. When i select from the combo it shoul print that partiuclar students details only
i hv to submit this as my project. tomorrow is the last date. any help can be appreciated. printing ?
saj
any suggestion... please
saj
You can pass a where clause for when you open your report.
VB Code:
Application.DoCmd.OpenReport "Report1", acViewPreview, , "Field1 = 'Something'", acWindowNormal