var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Updating a field
I wasn't quite sure what to call the topic as I am not really sure what it is I am looking for.
I have an Item table. This contains a field called ItemsRemaining.
I have a form where customers select an item name from the item table. The customer can only select one item.
So what I need to do is update the ItemsRemaining field by -1 when the member selects that item from the dropdown.combo box on the form.
I have looked into update queries but I can only update every single Item's quantity by -1 and not a specific item a customer chooses.
Thanks for any help.
You can set criteria in an update query.
Add the item_number (or whatever you've called it) and items_remaining fields to the update query and set the criterion for item_number to equal the control value from the form (i.e., [MyForm].[ControlName]). Leave the "Update To" section blank for this field and only the items_remaining field will be updated.
As long as the form is open, the query will work
This raises the issue of whether the value should be saved in the first place. There's a good discussion here: