I am importing Excel files into Access and trying to automate queries in order to manipulate and create reports. In a subroutine, several queries are run to CREATE and UPDATE a TEMP table.
In the beginning of a subroutine the user is asked for a variable, MyValue. The code is:
Later in the same subroutine the variable MyValue is used in an UPDATE query. The code is:
Why is Access putting a box up before the UPDATE query? The box indicates 'enter parameter' and asks 'Enter MyValue'?
Thanks,
Carl
In the beginning of a subroutine the user is asked for a variable, MyValue. The code is:
Code:
'Dim MyValue As Variant
MyValue = InputBox("1. Enter Sheet #", "MyInputbox")
tblname = "Sheet" & MyValue
Code:
strSql = "UPDATE [" & tblname & "] SET MyValue1 = MyValue WHERE MyValue1 Is Null" DoCmd.RunSQL strSql
Thanks,
Carl
Comment