Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
InventoryDatabase
Alex Hedley 
           
15 years ago
Hi Nauman,

I meant Request instead of Loan, mistook what you were doing, but the principle is the same.

So lets start by creating a few tables.

BOOKT
BookID - AutoNumber
BookName - Text
InitialQty - Number

EMPLOYEET
EmployeeID - AutoNumber
EmployeeName - Text

REQUESTT
RequestID - Autonumber
BookID - Number [ForeignKey]
RequestQty - Number
EmployeeID - Number [ForeignKey]

(This table has been added to track who has requested the books)

Fill in some values

BOOKT
1  Book1  2000
2  Book2  2000
3  Book3  2000

EMPLOYEET
1  Fred
2  John
3  Alice
4  Sue

Now lets request some books:

REQUESTT
1  1  100  1
2  1  100  3
3  2  50    2
4  3  300  4

Next create a query.

TOTALREQUESTQ
Pull in the BookID and the RequestQty
Click the Sigma symbol (Σ) to add the totals row to the fields and GroupBy BookID, Sum RequestQty.
You will now have a total amount of Books requested by all Employees.

Now create a second query
REMAININGQ
Pull in the BookT and TotalRequestQ, the BookIDs should link.
Add the BookID, BookName, InitialQty to the Query.
Now we want to create a calculated field
Type in:- Remaining: [InitialQ]-[SumOfRequestQty]
Click the Run (!) and you should have

1  Book1  2000  1800
2  Book2  2000  1950
3  Book3  2000  1700

Further Queries can be made to see which employee has what. You could add a date field to the REQUESTT to log what day they are requested, removed from inventory, the list goes on.

Al


This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/14/2026 5:54:23 AM. PLT: 1s