473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Update Query Issues

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
1 1469
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
9
by: James Butler | last post by:
Our setup: Online db: MySQL Inhouse db: MS Access 97 with MySQL tables linked via ODBC Our issue: Almost every field updates successfully, except one. A scenario: Information is written to...
1
by: md7546 | last post by:
Hi, first time posting to this group, but I have followed advice and examples for several months, so thank you. I work for a small telecommunications company. I have a simple Orders database...
6
by: FayeC | last post by:
I really need help figuring this out. i have a db with mostly text fields but 2. The user_id field is an autonumber (key) and the user_newsletter is a number (1 and 0) field meaning 1 yes the ...
1
by: san | last post by:
Hi, I have the following update statement that updates one table by the values from the other table which seems have some problem with the syntax. UPDATE tblResolve SET...
6
by: '~=_Slawek_=~' | last post by:
I have problem with SQL update. Sometimes it can take 2-10 seconds. I need to make this update every time page is opened - ASYNCHRONOUSLY. I have read forums, php.net etc about running php code...
6
by: Akhenaten | last post by:
Coding apparently leads to blindness! I have an unclosed quote in here and I'm not sure where...... $query="UPDATE table_name set ". "First_Name= \"".$formVars."\",". "Date_Committed=...
0
by: jon | last post by:
Hi there, I'm brand new to Access and may be trying to do too much too soon, but I wanted to get some expert advice on how the best way to go about what I am trying to accomplish would be. I...
5
by: abhilashcashok | last post by:
hi guys, my prblem is that I cannot update sql query against MS ACCESS using C#. Everytime wen i do so, i got an exception (at runtime) as 'UPDATE syntax not correct'. I don find any error in my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.