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

Inventory Form

DS
Hi,
I'm building an Inventory form. I have a Product Form and ono that form
I want to place a sub-form showing the sold products along with the
Products that were received. I have a calculated field to show me what
my current inventory is. However, I want to only use one Sub-Form as
oppossed to two. When I try to set up a query using the Products table
in the center and Orders on one side and Sales on another Access can't
return results with the two tables. If i remove either the Orders or the
Sales the Query works. Are there any samples of a situation like this
out there? Thanks
DS
Nov 13 '05 #1
2 2262
gj
DS wrote:
Hi,
I'm building an Inventory form. I have a Product Form and ono that form
I want to place a sub-form showing the sold products along with the
Products that were received. I have a calculated field to show me what
my current inventory is. However, I want to only use one Sub-Form as
oppossed to two. When I try to set up a query using the Products table
in the center and Orders on one side and Sales on another Access can't
return results with the two tables. If i remove either the Orders or the
Sales the Query works. Are there any samples of a situation like this
out there? Thanks
DS


You need to use a Union query. Note you must have the same number of
fields in each query.
- The first query determines field names, etc so the first field I have
called ACTION can be referred to by the OrderBy clause. Additionall
sorting on the filed SOLD_DATE will sort for both the first and second
queries as the results for the RECEIVED query are appended to the bottom
of the first query.
- You can also add a WHERE clause with each query to maybe limit by date.
- The Orderby clause will sort the results from the two queries by Date
and then ction so for sales and received on the same day Received will
show first.

SELECT "SOLD" AS "ACTION,PRODUCT_ID, SOLD_DATE,SOLD_QUANT FROM TBL_SOLD
WHERE SOLD_DATE > #1 MAY 2000#
UNION
SELECT "RECEIVED",PRODUCT_ID, RECEIVED_DATE,RECEIVED_QUANT FROM TBL_SOLD
WHERE RECEIVED_DATE > #1 MAY 2000#
ORDER BY SOLD_DATE, ACTION
Gavin
Nov 13 '05 #2
Try a Union Query

"DS" <bo******@optonline.net> wrote in message
news:dp**********************@news4.srv.hcvlny.cv. net...
Hi,
I'm building an Inventory form. I have a Product Form and ono that form I
want to place a sub-form showing the sold products along with the Products
that were received. I have a calculated field to show me what my current
inventory is. However, I want to only use one Sub-Form as oppossed to
two. When I try to set up a query using the Products table in the center
and Orders on one side and Sales on another Access can't return results
with the two tables. If i remove either the Orders or the Sales the Query
works. Are there any samples of a situation like this out there? Thanks
DS

Nov 13 '05 #3

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

Similar topics

0
by: HK | last post by:
I have an inventory form designed in continuous format so that users can edit quantity on hand information. I have numerous filters set up because the inventory table holds sever hundred thousand...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
1
by: Doll | last post by:
I need some help please. I need to show data as disabled but visible on 1 of my forms that is linked up to another table. For example: I have 2 forms and 2 tables. Form A is linked to table...
2
by: danthrom | last post by:
I have this update query UPDATE LEFT JOIN ON .=. SET . = . WHERE .=.; Which updated the storage date for all linked data with the similar box number. Now I want to create a SQL that will...
1
by: starcandy | last post by:
haii........ ,first at all sorry because im not good in english i want to ask how to add quantity for inventory system .this is my form but it has error... <?php...
4
Sandboxer
by: Sandboxer | last post by:
I want to be able to program Access to provide for me, by individual day, what my contract obligations are to my customers. Will Access recognize all the individual days in between a date range...
1
geolemon
by: geolemon | last post by:
I have a form/subform used for inventory management. It is a bound form. The error: I don't understand what this means. How the form is intended to work: When you select a part number in...
3
by: monion | last post by:
Hello, I am trying to retrieve multiple rows from a database, place each row into a form and beside each row add an input field with a variable field name. So far I can only pull one row. If it...
6
by: Amy Badgett | last post by:
I am currently trying to create an inventory database that includes a form that will update the inventory numbers last updated in the database. Rather than having one row constantly being updated in...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...
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.