473,386 Members | 1,823 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,386 software developers and data experts.

Updating query running from form

I have this update query

UPDATE [Storage Box Inventory] LEFT JOIN [Box Number/Contents Table] ON
[Storage Box Inventory].[Box Number]=[Box Number/Contents Table].[Box
Number] SET [Box Number/Contents Table].[Storage Date] = [Storage Box
Inventory].[storage date]
WHERE [Storage Box Inventory].[Box Number]=[Box Number/Contents
Table].[Box Number];

Which updated the storage date for all linked data with the similar box
number. Now I want to create a SQL that will run on a form command or
afterupdate.

The SQL above updates all data, I only want to update the date related
to the box number opened under the form. Ideally, access updates the
data (or something like that) after inputting the correct date under
the Storage Box Inventory form.

thanks,

danthrom

Jul 24 '06 #1
2 1477

danthrom wrote:
I have this update query

UPDATE [Storage Box Inventory] LEFT JOIN [Box Number/Contents Table] ON
[Storage Box Inventory].[Box Number]=[Box Number/Contents Table].[Box
Number] SET [Box Number/Contents Table].[Storage Date] = [Storage Box
Inventory].[storage date]
WHERE [Storage Box Inventory].[Box Number]=[Box Number/Contents
Table].[Box Number];
AND [Storage Box Inventory].[Box Number] = me.cboboxnumber

you need to add a filter for the single record you're trying to update.
you need a [fieldname] = the open form's related field.

then assign that stuff to a button on your form.

docmd.openquery "qupd..."

If it's in a canned query, you can just point at the open form. (then
you need to use

=Forms![formname]![controlname]

Jul 25 '06 #2
Thanks,

you answered my question and it works well.

danthrom

pi********@hotmail.com wrote:
danthrom wrote:
I have this update query

UPDATE [Storage Box Inventory] LEFT JOIN [Box Number/Contents Table] ON
[Storage Box Inventory].[Box Number]=[Box Number/Contents Table].[Box
Number] SET [Box Number/Contents Table].[Storage Date] = [Storage Box
Inventory].[storage date]
WHERE [Storage Box Inventory].[Box Number]=[Box Number/Contents
Table].[Box Number];
AND [Storage Box Inventory].[Box Number] = me.cboboxnumber

you need to add a filter for the single record you're trying to update.
you need a [fieldname] = the open form's related field.

then assign that stuff to a button on your form.

docmd.openquery "qupd..."

If it's in a canned query, you can just point at the open form. (then
you need to use

=Forms![formname]![controlname]
Jul 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
Hello, Sorry to ask what is probably a simple answer, but I am having problems updating a table/database from a PHP/ PHTML file. I can Read From the Table, I can Insert into Table/Database, But...
11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
3
by: Ryan.Chowdhury | last post by:
This is a general question regarding the use of view and stored procedures. I'm fairly new to databases and SQL. I've created a SQL database using an Access Data Project ("ADP") and I'm...
1
by: Derek Davlut | last post by:
I have a Table that contains data that I use in a query to manipulte the data through expressions. I have a form that uses the query for manipulating the data. How do I write the changed values...
3
by: MLH | last post by:
I have a form, bound to a query. Its RecordSource property is a query named frmEnterLienAmounts. The form has a few bound controls and some unbound controls. The unbound controls are calculated...
2
by: Jaaz | last post by:
Essentially I'm constructing a database to track a lot of data. Part of this included a running history table that is linked to data outside the table. On the main form I used, I've hit a snag. ...
15
by: sara | last post by:
I have a Memo field in a table to hold notes from a conversation a social worker has had with a client (this is for a non-profit). If the user needs to update the memo field, I need to find the...
1
by: Arnold | last post by:
Greetings, I have a form, frmProgressReports, with qryProgressReports as the recordsource. A field in the query is named 'Select" and is yes/no, with criteria set to true. This filters the form...
3
by: Spoogledrummer | last post by:
Hi it's me again, still working on the sam 5 minute problem so feeling kind of thick now. I've dumped the idea of using a textarea for now and am using a textbox instead but am struggling when it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.