Hi,
Below is the code for creating table from data queried by prompting user to enter customer id.
If Customer exist, create data history of customer.
Planning to run this query via VBA using ADO or VBA coding with already provided customer id through a variable assigned from excel cell.
Problem: While running the query via VBA code "QryCreateTbl_Test", it prompts for cust Id. Where to enter parameter in below VBA code or ADO connection
Looking for solution: Removing prompt for user entering customer id and gets value from an excel cell to a variable for running the query.
Where/How to run ACCESS query with parameter in VBA or by using ADO
Below is the code for creating table from data queried by prompting user to enter customer id.
If Customer exist, create data history of customer.
Planning to run this query via VBA using ADO or VBA coding with already provided customer id through a variable assigned from excel cell.
Problem: While running the query via VBA code "QryCreateTbl_Test", it prompts for cust Id. Where to enter parameter in below VBA code or ADO connection
Looking for solution: Removing prompt for user entering customer id and gets value from an excel cell to a variable for running the query.
Where/How to run ACCESS query with parameter in VBA or by using ADO
Code:
Sub MakeDataTable()
Dim Appl As Object
Dim sCustId As String
Set Appl = CreateObject("Access.Application")
Appl.openCurrentDatabase ("Test.mdb")
Appl.Visible = True
Appl.DoCmd.SetWarning = True
Appl.DoCmd.OpenQuery "QryCreateTbl_Test", acViewNOrmal, acReadonly
Appl.DoCmd.SetWarning = False
App.Quit
End Sub