473,396 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sum database column for an ATM simulation

variouz3ckz
we are required to do a simple atm machine-like, using vb6... that able user to deposit, withdraw and check balance...
my problem is... i cannot sum up the amount the user wants to deposit and the balance the user has in the database(im using MS ACCESS)

should i use number as its data type?!

plz help me guys...

im expecting your helpsss ASAP... tnx
Sep 22 '07 #1
2 1950
hariharanmca
1,977 1GB
we are .............
Ofcourse set Data type to number and at the bottom (General) FieldSize to Double then use a query like

Expand|Select|Wrap|Line Numbers
  1. Dim strSql As string
  2. strSql = "Select sum(amountField) As TotalAmount from tblTableName where userID = " & intUserId 
Sep 22 '07 #2
Ofcourse set Data type to number and at the bottom (General) FieldSize to Double then use a query like

Expand|Select|Wrap|Line Numbers
  1. Dim strSql As string
  2. strSql = "Select sum(amountField) As TotalAmount from tblTableName where userID = " & intUserId 
ei i used this code, in the deposit but when i check the balance it end to error indicating that invalid use of null...

this is my code for DEPOSIT

Private Sub Command1_Click()
With Data1.Recordset


.Edit
str1 = balance + Val(txt_balance)
!balance = txt_balance
.Update

MsgBox "TRANSACTION SUCCESSFUL"

txt_deposit = ""
txt_deposit.SetFocus



End With
End Sub

and this is my code for check balance

Private Sub cmd_check_Click()
With Data1.Recordset

lbl_balance = !balance



End With

End Sub
Oct 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Constandinos Mavromoustakis | last post by:
Dear all, first we apologize if you receive multiple copies of this announcement. please see below if you are interested. Thank you in advance....
2
by: Samir Patel | last post by:
For last couple of weeks, I was doing lot of research on various simulation libraries. Only one I find in python is http://simpy.sourceforge.net. It is very powerful, but it seems that it does not...
0
by: Constandinos Mavromoustakis | last post by:
http://agent.csd.auth.gr/~cmavrom -------------------------------------------------- ============================================================================ = 37th Annual Simulation...
0
by: Gus | last post by:
---------------------------------------------------------------------------- ------------------------------------ Call for Papers: 38th Annual Simulation Symposium Part of the 2005 Spring...
19
by: Nicolas Pernetty | last post by:
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for...
0
by: Karatza Helen | last post by:
Our apologies if you have received multiple copies -------------------------------------------------- Call for Papers: 38th Annual Simulation Symposium Part of the 2005 Spring Simulation...
2
by: Ben | last post by:
Could someone please tell me why couldn't I adjust my column/row properties of my dataGrid? I binded my table, created a new DataGridTableStyle and mapped it to my datagrid. However, my columns...
1
by: Tim Silva | last post by:
SDX Modeling, Simulation and Numerical Computing Environment for science and engineering has now been released. Major features include: * A unified simulation environment for modeling virtually...
4
by: Richard Blackwood | last post by:
Hello all. I have a few questions about simulation programming. One, do all programmers know to how to code a simulation? By simulation I mean a model of real world relationships (i.e. like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.