Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2005

Tip: Looking for answers? Try searching our database.

Stock Update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nkormath - 09 May 2005 12:25 GMT
Please help me

In my database there is 2 tables, named "MasterStock" and "Voucher".

MasterStock
--------------
StockId  (autonumber) - Key field
SotckDate (date)
BeginingNo (Text) - (10 charectors) format "0000000000"
Quantity (Number)- 0 decimal

Voucher
----------
VoucherNo (Text) - (10 charectors) format "0000000000" - Key field
StockId (Number) -duplicates - OK

Here we want to update Voucher table based on the data in MasterStock.
For example, We are inputing Begining number and Quantity in a form, it
should check if any voucher existing in "Voucher" table within this criteria
by a loop. If not, add to "Voucher" until the quantity met.

Please help me in this case...

Thanks in advance
Tim Ferguson - 09 May 2005 17:51 GMT
> Here we want to update Voucher table based on the data in MasterStock.
> For example, We are inputing Begining number and Quantity in a form,
> it should check if any voucher existing in "Voucher" table within this
> criteria by a loop. If not, add to "Voucher" until the quantity met.

I think you mean by this that the MasterStock.Quantity is meant to reflect
the number of Voucher records referencing that MasterStock record.

Bad Idea.

If you want to know how many Vouchers you have, simply count them: either
using a DCount() function, or, better, by joining the tables together and
using a COUNT aggregate function in the query. You just will not be able to
keep the two values in synch. What will you believe when you have two
different counts for the same thing?

Hope that helps

Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.