•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,672 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,257 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 3544 | Replies: 0
![]() |
•
•
Join Date: Jun 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Im having a slight problem adding my subtotals from listbox. The company i have a contract with has me to create a POS system which is my first (Cash Register Program that's better than Walmart"Do it yourself shop")
These are my controls using: lblTotal, lbl SubTotal, txtTax. I can do the tax and total afterwards but being able to scan barcodes listed in my db with prices just keep adding the price from the db to the lblsubtotal without Adding what's being scanned afterwards. Here's my previous code working now(i tried using the other code from here which you'll notice as well:
Dim strCount(1 To 1) As Integer
Dim strTotal As Integer
Dim stritemprice As Double
Dim var1 As Currency
Dim var2 As Currency
Dim var3 As Currency
Dim var4 As Currency
Dim var5 As Currency
var1 = Form1.lblsub.Caption
var2 = Form1.lbltotal
var3 = Form1.txttax
var4 = Form1.List1.ListIndex
var5 = Form1.digibox.DigitDisplay
For curTotal = 1 To stritemprice
Form1.lblsub.Caption = strCount(1) + curTotal
Next curTotal
End Sub
Any scan i do, The "lblItemprice" queries the DB("Price") and returns it's price in the lblItemprice ex $3.00. The lblsub is supposed to add the current total before tax, when i scan again for another product, it replaces the previous price with the currently scanned price "Not Adding"
Please help me. Please respond to APorter101@aol.com
Thank you in advanced
These are my controls using: lblTotal, lbl SubTotal, txtTax. I can do the tax and total afterwards but being able to scan barcodes listed in my db with prices just keep adding the price from the db to the lblsubtotal without Adding what's being scanned afterwards. Here's my previous code working now(i tried using the other code from here which you'll notice as well:
Dim strCount(1 To 1) As Integer
Dim strTotal As Integer
Dim stritemprice As Double
Dim var1 As Currency
Dim var2 As Currency
Dim var3 As Currency
Dim var4 As Currency
Dim var5 As Currency
var1 = Form1.lblsub.Caption
var2 = Form1.lbltotal
var3 = Form1.txttax
var4 = Form1.List1.ListIndex
var5 = Form1.digibox.DigitDisplay
For curTotal = 1 To stritemprice
Form1.lblsub.Caption = strCount(1) + curTotal
Next curTotal
End Sub
Any scan i do, The "lblItemprice" queries the DB("Price") and returns it's price in the lblItemprice ex $3.00. The lblsub is supposed to add the current total before tax, when i scan again for another product, it replaces the previous price with the currently scanned price "Not Adding"
Please help me. Please respond to APorter101@aol.com
Thank you in advanced
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- listbox multiple selection (ASP.NET)
- listbox hiccup (Visual Basic 4 / 5 / 6)
- adding totals in listboxes (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: File Saving / Reading - Non Constant Folder? Help needed
- Next Thread: Sending hex over serial in QB


Linear Mode