I'm attemping to run an Access report through VB. The code works just fine, but for this particular report, the query it pulls from to generate the report requires the user to enter a parameter. It pops open a message box and asks for "Employee ID", which is used as a filter. How do I modify my existing code to pass the employee ID entered in my VB program to Access without the user having deal with the message box?
VB Code:
Private Sub EmployeeHRWeek() Dim A As Object A = CreateObject("Access.Application") A.Visible = False A.OpenCurrentDatabase("f:\svrc\timeclock\Timekeeping.mdb", False, "password") A.DoCmd.OpenReport("EmployeeHoursByWeek") A.Quit() End Sub
Thanks.




Reply With Quote