D
Derek Wittman
Here's my code so far. Seems simple enough. But I cannot figure out why,
even though I'm defining lngoper up front, the code is asking me for it in
another input box WITHOUT any text other than the name of the variable.
Private Sub DoStuff_Click()
Dim lngoper As Long
lngoper = InputBox("Enter Operation ID", "Entry required to continue")
DoCmd.RunSQL ("delete * from tbloperid")
DoCmd.RunSQL ("insert into tbloperid (lngopernumber) values (lngoper)")
End Sub
Once I get it working so I'm only asking the user once, I'd like to output
two queries via transferspreadsheet to one workbook. I think I got that
part. But I cannot make this work. A colleague suggested for the variable's
value, I have a 1 record, 1 field table and store it there. Delete it,
inputbox the new value and insert it via SQL. Link that to the criteria
field in the 2 queries.
The other option, whichever is easier, is an UPDATE SQL command.
Any and all insight will be greately appreciated.
even though I'm defining lngoper up front, the code is asking me for it in
another input box WITHOUT any text other than the name of the variable.
Private Sub DoStuff_Click()
Dim lngoper As Long
lngoper = InputBox("Enter Operation ID", "Entry required to continue")
DoCmd.RunSQL ("delete * from tbloperid")
DoCmd.RunSQL ("insert into tbloperid (lngopernumber) values (lngoper)")
End Sub
Once I get it working so I'm only asking the user once, I'd like to output
two queries via transferspreadsheet to one workbook. I think I got that
part. But I cannot make this work. A colleague suggested for the variable's
value, I have a 1 record, 1 field table and store it there. Delete it,
inputbox the new value and insert it via SQL. Link that to the criteria
field in the 2 queries.
The other option, whichever is easier, is an UPDATE SQL command.
Any and all insight will be greately appreciated.