Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Automatic update of stock in a textbox


Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2006, 04:58 AM
getkrishpm getkrishpm is offline
Freshman
 
Join Date: Mar 2006
Posts: 29
Default Automatic update of stock in a textbox


Hai everyone, I dont know how to update the stock in my program. Actually, I am having two forms one is to enter the opening stock and the other to enter the usage of stock. In the opening stock form i select the item purchased and enter the date of purchase, shop name, quantity, rate, amount and the opening stock, which is the quantity bought.

In usage of stock form again i select the item ,enter the date of usage and the quantity used. In the balance textbox i want to display the balance which is the opening stock minus usage. It can work for the first time but if i enter another entry in usage of stock form for the same item the balance text box should show the balance correctly, ie previous balance - current usage. The opening stock should be the same. What i have to do, i send the table design and form design please help me ,is there any modifications has to be done in the design.
Attached Images
File Type: jpg 1.JPG (16.1 KB, 7 views)
File Type: jpg 2.JPG (20.7 KB, 5 views)
Attached Files
File Type: zip Db1.zip (9.4 KB, 10 views)
Reply With Quote
  #2  
Old 04-13-2006, 09:10 AM
DRW DRW is offline
Junior Contributor
 
Join Date: Aug 2002
Location: England
Posts: 308
Default

DB1 (Access2000?) Only contains tables not forms!

If you are trying to read a value from the database then base the textbox on a query of the table.

i.e. in the properties of the textbox select data and in the Control Source select the field you want.

e.g.

=[Dayusage]![Balancestk]

When you need an updated value of this field than refresh the textbox.

e.g. 'text0.Requery'

I am not an expert in VBA but this should work.
Reply With Quote
  #3  
Old 04-14-2006, 04:31 AM
getkrishpm getkrishpm is offline
Freshman
 
Join Date: Mar 2006
Posts: 29
Default

Thanks all i got the problem solved.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->