Decrement items from the database and payslip invoice

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Dec 2008
Posts: 21
Reputation: sackymatt is an unknown quantity at this point 
Solved Threads: 0
sackymatt sackymatt is offline Offline
Newbie Poster

Decrement items from the database and payslip invoice

 
0
  #1
Aug 5th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 837
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 153
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: Decrement items from the database and payslip invoice

 
0
  #2
Aug 5th, 2009
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
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 21
Reputation: sackymatt is an unknown quantity at this point 
Solved Threads: 0
sackymatt sackymatt is offline Offline
Newbie Poster

Re: Decrement items from the database and payslip invoice

 
0
  #3
Aug 6th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 837
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 153
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: Decrement items from the database and payslip invoice

 
0
  #4
Aug 6th, 2009
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
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC