I am new to VB and I am stuck. I am trying to pass an invoice number to a report that has a parameter query behind it. I get all invoices and not the one I enter. Can somebody see what I am doing wrong? The database in "addata.mdb", the report is "rptInvoice" Thanks!
Dim DBPath As String
Dim myparameter As String
Dim mystring As String
myparameter = InputBox("Enter Invoice Number ?")
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application.11")
DBPath = "D:\addata.mdb"
appAccess.OpenCurrentDatabase DBPath
appAccess.DoCmd.OpenReport "rptInvoice", 2, myparameter
Dim DBPath As String
Dim myparameter As String
Dim mystring As String
myparameter = InputBox("Enter Invoice Number ?")
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application.11")
DBPath = "D:\addata.mdb"
appAccess.OpenCurrentDatabase DBPath
appAccess.DoCmd.OpenReport "rptInvoice", 2, myparameter