Form Help

  • Thread starter Thread starter Bgreer5050
  • Start date Start date
B

Bgreer5050

I have a Switchboard form that is not linked directly to a table. The
various buttons on the form bring the user to various inventory control
forms.

I would like to add a few command buttons to the switchboard that would do
the following:

Button Called "Remove Filter Pack From Inventory"

Clicking the button would do the following in a table called inventory:


Table Name Inventory
Fields: ID and QtyOnHand

Action as a result of click:
Remove (1) from the field on hand of the record with ID 2345

Any help would be appreiated.
 
You need an update query behind the button's click event:

DoCmd.RunSQL "Update Inventory Set QtyOnHand = (QtyOnHand -1) Where ID =
2345"
 
Worked Great...Thanks

Is there a way to prevent access from telling the user they are about to
update (1) record and to confirm ?

Thanks
 
Yes.

DoCmd.Setwarnings False

Remember to turn them back on after executing the sql statement.

DoCmd.Setwarnings True
 
Back
Top