By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Update Query Issues

P: n/a
All,

When you sell a product we require access to remove that information
from the stock table, so the product is sold througha comobo box named
"Combo4" under the prodcuts sold form which is a sub-form of the form
Appointments.

When creating the update query I used the [UnitsInStock]-1 to redcue
the number of avaliable items in stock, but Access prompts for the name
of the item you wish to remove, so how do you tell Access to get this
from the sub-form values, I thought it was:

Prodcuts Sold Form.ProductID.Combo4

But this does not work, also there are mutiple items, so we would like
one query for all the items sold when you click on the save button

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
To refer to a control on a subform, you first have to refer to the Parent
form, then the subform control on the Parent. The subform isn't "open" as a
stand alone form, so you can't refer to it directly by name. Also, names
with spaces in them will need to be enclosed in brackets [ ].

Example:
Forms!frmNameOfParentForm!ctlNameOfSubformControl. Form!Combo4

The subform control may or may not have the same name as the subform itself.
To get the name of the subform control, open the parent form in design mode,
open the Properties sheet, and click on the subform ONE time. The Properties
sheet should show the name of the subform control. If you click more than
once, you'll be in the subform and the Properties sheet will show the name
of the subform or one of its controls.

--
Wayne Morgan
MS Access MVP
<Jo********@nationalexpress.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
All,

When you sell a product we require access to remove that information
from the stock table, so the product is sold througha comobo box named
"Combo4" under the prodcuts sold form which is a sub-form of the form
Appointments.

When creating the update query I used the [UnitsInStock]-1 to redcue
the number of avaliable items in stock, but Access prompts for the name
of the item you wish to remove, so how do you tell Access to get this
from the sub-form values, I thought it was:

Prodcuts Sold Form.ProductID.Combo4

But this does not work, also there are mutiple items, so we would like
one query for all the items sold when you click on the save button

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.