Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto reply to prompts 1

Status
Not open for further replies.

GRM1T

Programmer
Joined
Feb 29, 2008
Messages
1
Location
GB
I am using a RUNSQL as below:-
strUpdatePalletQty = "UPDATE PalletInfo " & _
"SET Qty = Qty+1 " & _
"WHERE PalletNo = [PalletNo];"
DoCmd.RunSQL strUpdatePalletQty

MSAccess requests an input to confirm update of one raw. The answer is always going to be YES.
Can this be done automatically so that the program doesn't wait for the user to press "Y" or a mouse click?
 
Code:
strUpdatePalletQty = "UPDATE PalletInfo " & _
     "SET Qty = Qty+1 " & _
     "WHERE PalletNo = [PalletNo];"
DoCmd.SetWarnings False
DoCmd.RunSQL strUpdatePalletQty
DoCmd.SetWarnings True

Duane
Hook'D on Access
MS Access MVP
 
If you use

Code:
CurrentDB.Execute strUpdatePalletQty

you wont have to mess with warnings!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top