944,007 Members | Top Members by Rank

Ad:
Aug 5th, 2009
0

Decrement items from the database and payslip invoice

Expand Post »
Hi all, I want to know how i can decrement the value of quantity in stock in my data base. This would be based on how times an item is purchased. So every time an item is clicked, i want to show the quantity has decreased in the database. I am using vb6 and i have my database in msaccess..

I also want to know how can i create a payslip invoice in vb6..when an item to be bought is entered, the information desplays at that area that will be printed out as an invoice..
pls help
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
sackymatt is offline Offline
29 posts
since Dec 2008
Aug 5th, 2009
0

Re: Decrement items from the database and payslip invoice

UPDATE Table1 SET Field2=Table1.Field2-1 WHERE Field1=Value

Where Field1 = unique value to identify record and Field2 = the value you want to decrement by 1

As for creating an invoice there are several ways. Datareport, Crystal Report, or one of your own design via the Printer object. But to be able to do this you will need a purchase table to record the items purchased with some unique ID that ID's the customer so when you go to print the reciept, the table can be queried against.


Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Aug 6th, 2009
0

Re: Decrement items from the database and payslip invoice

Hi,vb5prgrmr, with this one, do i do it in the database or in vb?
"UPDATE Table1 SET Field2=Table1.Field2-1 WHERE Field1=Value

Where Field1 = unique value to identify record and Field2 = the value you want to decrement by 1"

and for the crystal report, do i need to install it?

thanx
Reputation Points: 10
Solved Threads: 0
Light Poster
sackymatt is offline Offline
29 posts
since Dec 2008
Aug 6th, 2009
0

Re: Decrement items from the database and payslip invoice

Either, if from vb use the command object to execute it.

As for crystal reports, yes you will need to install it. if you have pro or enterprise you should find on the disk a folder named crystal, inside is the installable. Run it and you will have crystal reports 4.5.


Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Having problems with Null when running code in VB6 and MS Access
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to convert vb file to exe





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC