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

query problem

2
Hi
I have a form (Add Parts) based on a table (Stock). Table has qty (stock in hand) and qtyBuy field related to the form that I want to update. I want an action query to update qty field. I write the query in a macro and I set it on qty lost focus event but it sometime show the new value sometime show message “Writing Conflict”
Please tell me the solution.
Thanks.
hbidhan "AT" yahoo "DOT" com

UPDATE Stock SET Stock.qty = nz([Forms]![Add Parts]![qty])+nz([Forms]![Add Parts]![qtyBuy])
WHERE (([Forms]![Add Parts]![partsNo]=[Stock]![partsNo]))
Nov 9 '06 #1
2 942
MMcCarthy
14,534 Expert Mod 8TB
I have moved this post into it's own thread as it is not part of the thread it was on. You are more likely to get a response to your query this way.

Also, I have edited the email address you gave as giving a proper email address means it's likely to be picked up by a trawling engine and hijacked for spamming purposes.

Moderator
Nov 10 '06 #2
PEB
1,418 Expert 1GB
Hi in fact there is simultaneous write on the respective record
I suggest you to create a Qty field in your form that can be hidden if you don't want to be visualised and in the Lost Focus Event write an event procedure like this:
Me!qty = nz([Forms]![Add Parts]![qty])+nz([Forms]![Add Parts]![qtyBuy])

Hope this helps!

Hi
I have a form (Add Parts) based on a table (Stock). Table has qty (stock in hand) and qtyBuy field related to the form that I want to update. I want an action query to update qty field. I write the query in a macro and I set it on qty lost focus event but it sometime show the new value sometime show message “Writing Conflict”
Please tell me the solution.
Thanks.
hbidhan "AT" yahoo "DOT" com

UPDATE Stock SET Stock.qty = nz([Forms]![Add Parts]![qty])+nz([Forms]![Add Parts]![qtyBuy])
WHERE (([Forms]![Add Parts]![partsNo]=[Stock]![partsNo]))
Nov 19 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP (running off Apache 1.3.31 w/ PHP 5.0.1) to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using...
3
by: Brian Oster | last post by:
After applying security patch MS03-031 (Sql server ver 8.00.818) a query that used to execute in under 2 seconds, now takes over 8 Minutes to complete. Any ideas on what the heck might be going...
1
by: Jeff Blee | last post by:
I hope someone can help me get this graph outputing in proper order. After help from Tom, I got a graph to display output from the previous 12 months and include the average of that output all in...
8
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
4
by: Apple | last post by:
1. I want to create an autonumber, my requirement is : 2005/0001 (Year/autonumber), which year & autonumber no. both can auto run. 2. I had create a query by making relation to a table & query,...
11
by: Andy_Khosravi | last post by:
My problem: I'm having trouble with a query taking much too long to run; a query without any criteria evaluating only 650 records takes over 300 seconds to run (over the network. On local drive...
4
by: Konrad Hammerer | last post by:
Hi! I have the following problem: I have a query (a) using another query (b) to get the amount of records of this other query (b), means: select count(MNR) as Number from...
4
by: Stan | last post by:
I am using MS Office Access 2003 (11.5614). My basic question is can I run a query of a query datasheet. I want to use more that one criteria and can not get that query to work. I thought I...
2
by: existential.philosophy | last post by:
This is a new problem for me: I have some queries that open very slowly in design view. My benchmark query takes about 20 minutes to open in design view. That same query takes about 20 minutes...
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?
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.