473,594 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to keep a running inventory in Access Database of retail sales

67 New Member
I have a database similar to Northwind Traders. I need to reduce the INVENTORY Field of my PRODUCT Table daily, by the number of Products sold each day. (In essence I am keeping a running inventory - which my client requires.)

I have two TABLES called PRODUCT and ITEMS:

The PRODUCT Table contains fields called PRODUCT ID, INVENTORY and DATE LAST REVISED (as well as others).

The ITEMS Table contains fields called DATE SOLD, PRODUCT ID, VOLUME SOLD (as well as others).


I have four QUERIES:
Query 1 draws from the ITEMS Table. It lists what PRODUCT IDs and associated VOLUMES SOLD have occurred since the latest DATE LAST REVISED on the PRODUCT Table (a criteria input by user).

Query 2 draws from Query 1. It sums up by PRODUCT ID the volumes of PRODUCT SOLD since the latest DATE LAST REVISED on the PRODUCT Table using Query 2 as its source.

Query 3 draws from Query 2 and the PRODUCT TABLE. It computes a REVISED INVENTORY for just those PRODUCT IDs that appeared in Query 2, by subtracting the UNITS SOLD from the INVENTORY level then in the PRODUCT Table. I have also created a field called DateOfUpdate, which is populated with the expression Date().

Query 4 is an UPDATE TABLE. I am trying to Update the REVISED INVENTORY values to the INVENTORY field of the PRODUCT Table, and the DateOfUpdate to the DATE LAST REVISED. However, each time I try to view the table prior to executing the UPDATE, I get nothing but the old INVENTORY levels and no date at all in the second field.

Any suggestions as to what I may be doing wrong. Or any suggestions on how to better design a way of keeping track of my Inventory? Thanks for the assistance.
Aug 7 '10 #1
2 4371
Jerry Maiapu
259 Contributor
Post the SQL string of query 4 (update query)
Aug 9 '10 #2
Delerna
1,134 Recognized Expert Top Contributor
Its not stated but I presume Query4 is using the data from Query3 to update the table ?

When you say you are trying to view the table prior to executing the update do you mean by running Query3 ?

If so then the SQL code for Query3 needs to be posted, in fact an answer would probably arrive quicker if you posted all 4 queries
Aug 9 '10 #3

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

Similar topics

5
2852
by: william | last post by:
Hi, I have an ASP page needs to access a remote MS Access2000 database, I got error "The Microsoft Jet database engine cannot open the file 'F:\Collect.mdb'. It is already opened exclusively by another user, or you need permission to view its data. ". The 'F:\' is a mapped drive from remote machine where the access database loactes. If I copy the database back to local box, no problem. Could anyone tell me how to make it work? Thanks....
8
1824
by: lkrubner | last post by:
An old friend of mine recently approached me and said something like: "I've a computer at my office that has an Access database running on it. We've most of our company info in there. We'd like to put a portion of it online as a dynamic site, but we don't want the database to leave our office. Our office is connected to the Internet through a static IP. Can you do it?" I said no, but I also said I'd look into it. Could a PHP script...
5
3682
by: premmehrotra | last post by:
I currently have a multi-user access database which is put on a shared drive L: on a Windows Servers. Entire database is one file premdb.mdb. Users access this database from their laptops. Following problems occur: 1. Access is way too slow in WAN environment. Server is located in New Jersey and users are in California and Puerto Rico. 2. Database often becomes corrupt 3. When one user updates some data in the database, other users...
0
3203
by: marko | last post by:
Hi all! I'm trying to make a access database for my fathers shop and I'm pretty stuck so if anyone could help me that would mean a great deal for me! I would like to make a database in wich the sales persons would type in what they sold and then the fun begins. :-) First if someone knows some already finished examples from which i could learn that would be great. And now here is what i have to do. We have a retail shoe(sneakers) shop....
1
4123
by: Azel | last post by:
Hi, I am trying to learn ADO.net and I keep running into problems trying to insert data into my Access Database: data.mdb. here is my code: <code> // Database Variables
4
1436
by: et | last post by:
I have an aspnet program that uses an Access database -- I won't go into why I'm using Access -- and can't get it to run in share mode. If I have opened the website, and I try to edit the database, I get a message saying the database is in read only because it's being used elsewhere. Even if I close the website, close the program, close everything I can think of, I still get the error. I always have to reboot. If I add Mode=Share...
9
3823
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
1
7992
by: maxvalery | last post by:
Hi, Looking for a quick and dirty on running an Access database as a linked server in SQL Server. Basically, the majority of my stuff is in SQL Server, but there is one lingering nightmare-of-an-Access-database no one wants to touch. I just want to create a linked server to use the Access db. So far I have not found a way to connect (under Security -Link
5
2171
by: John | last post by:
I have an ASP.NET 2.0 application developed in VB.net, that accesses an Microsoft Access database. When the database is on the same IIS server all works just fine. BUT when it tried to access the same database on a different server I get a permission error. I've created a shared drive on the other server and give it permission with all rights, as well as the Access database. BUT no matter how I set up the connection string in my app, I...
14
4623
by: SimeonD | last post by:
Hi I have an access database called Sales.Mdb In vb.net 2005, I'd like to open it. Which I can do. What I can't figure out is how to figure out if Sales.Mdb is open already. If so, I want to open that instance. Any ideas how I would do this? Thanks
0
7947
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8010
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.