|
-
Jun 2nd, 2007, 08:20 PM
#1
Thread Starter
New Member
Bank Simulator ~ Help
My program is a bank simulator. I have some questions.
On my program, when I go to a deposit section, when i click $20, how do i make 20 add up to the current balance, what coding do i use.
Also I made a "NEW USER" section where the person fills in information and i want that information to be recorded on a notepad place where the admin or bank can see who registered. Also the new user will make their own pin so when they log in the bank, they enter their pin and they will be able to access their account like a real bank.
(basically, i don't know much of what coding i need to use ex. cmd20 = cmd20 + 20 or w.e)
Thanks~
-
Jun 2nd, 2007, 08:22 PM
#2
PowerPoster
Re: Bank Simulator ~ Help
(sniff)
(sniff sniff)
I smell a class project
(sniff)
I smell a lazy student
(sniff)
I smell donuts! MMMMMM donuts...bye :-P
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 08:23 PM
#3
Thread Starter
New Member
Re: Bank Simulator ~ Help
It is a class project, im not lazy i need help...
And donuts are bad 4 u!
-
Jun 2nd, 2007, 08:25 PM
#4
Re: Bank Simulator ~ Help
I'll help you if you give me some freakin' donuts. I love donuts, and I'm not even fat.
No one is going to do the code for you, but we'll help. Do you have any code done so far?
-
Jun 2nd, 2007, 08:27 PM
#5
PowerPoster
Re: Bank Simulator ~ Help
Almost everything that's bad for you tastes good...even cyanide (slightly bitter, but it's made from apple pips so I assume has an appley taste...Mmmmmm, apple cyanide :-))
Anyway, if you're doing the class project and you've been given a project that is too hard for you to do, shouldn't you speak with your tutor about it? We *could* talk you through it, but the stuff you are asking is elementary programming...it's stuff the tutor should have taught you before giving you such an assignment :-P
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 08:31 PM
#6
Thread Starter
New Member
Re: Bank Simulator ~ Help
Well there is alot of forms...
and when u press enter or w.e to get in the bank this is the coding:
Private Sub cmbbalances_Click()
Balances.Visible = True
End Sub
Private Sub cmdcancel_Click()
FrmStart.Visible = True
Unload Me
End Sub
Private Sub cmddeposit_Click()
deposit.Visible = True
Unload Begin
End Sub
Private Sub cmdwithdraw_Click()
Withdraw.Visible = True
Unload Begin
End Sub
on the DEPOSIT the coding is:
Private Sub cmd20_Click()
'THE CODE GOES HERE THAT I NEED LOL'
End Sub
Private Sub cmdcancel_Click()
Unload Me
Begin.Visible = True
End Sub
Private Sub Form_Load()
End Sub
Yea i need to know how to add 20 bucks on the account balance
-
Jun 2nd, 2007, 08:34 PM
#7
PowerPoster
Re: Bank Simulator ~ Help
assuming account balance is lblBalance you would use lblBalance.caption = val(lblBalance.caption) + 20
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 08:35 PM
#8
Re: Bank Simulator ~ Help
You need a public-scope variable. This is a variable that can be accessed by any form/module in your project.
Add a module to your project. Add something like:
Public sinBalance As Single
Then save it. That will be the variable you use in your project to store the current balance. You can manipulate that in the forms. ie:
Subtract $20 from the balance:
sinBalance = sinBalance - 20
To add:
sinBalance = sinBalance + 20
To display:
Label1.Caption = "$" & Format(sinBalance, "00.00")
Format formats the total balance in dollar format, ie: $20.00
Edit: or do what Smux said and work with it directly from a label.
-
Jun 2nd, 2007, 08:40 PM
#9
Thread Starter
New Member
Re: Bank Simulator ~ Help
hmm not sure if that is working, the balance is in a different form than the deposit.. so do i still use the same coding?
^^ for the post b4 the one ontop of this
ill read the one new person made
-
Jun 2nd, 2007, 08:46 PM
#10
Thread Starter
New Member
Re: Bank Simulator ~ Help
uhh its kinda hard with the module , what i want to do is :
I go click 20 on deposit, i t will show 20 bucks on a textbox on the same form, then when i click done, it will it add it to balances, therfor when i click done, it goes back to the menu where its deposit withdraw balances and ****, and when i click balances it will show me the RIGHT balance right now its 1000 and i want it to be 1020 when i clickd that 20$
-
Jun 2nd, 2007, 08:47 PM
#11
PowerPoster
Re: Bank Simulator ~ Help
if the balance is on a different form, add the form name to the info...I said lblBalance.caption above, now let's assume it's on form1, you would put form1.lblBalance.caption instead :-)
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 08:50 PM
#12
Thread Starter
New Member
Re: Bank Simulator ~ Help
Private Sub cmd20_Click()
txtmoney = Val(lblbalance.Caption) + 20
End Sub
like that or?
-
Jun 2nd, 2007, 08:53 PM
#13
PowerPoster
Re: Bank Simulator ~ Help
if txtmoney is updated with lblBalance, yes...but it all depends on your form's layout :-P
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 08:55 PM
#14
Thread Starter
New Member
Re: Bank Simulator ~ Help
Private Sub cmd20_Click()
lblbalance = Val(lblbalance) + 20
End Sub
lblbalance is located at Balances.frm
and cmd20 is located at deposit.frm
It still dosent add up to the lblbalance
-
Jun 2nd, 2007, 08:58 PM
#15
PowerPoster
Re: Bank Simulator ~ Help
ah, then you'd probably want
frmBalances.lblBalance.caption = Val(frmBalances.lblBalance.caption) + 20
Although this is all dependant on what the form is named *IN* the project...click on the form and look in properties
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 09:04 PM
#16
Thread Starter
New Member
Re: Bank Simulator ~ Help
OOOOOOOOOOOOOOOOOO SWEET yo thx alott tttt i yea its not frmbalances its just balances yeeeeeee thx more questions coming soon :P
-
Jun 2nd, 2007, 09:10 PM
#17
Thread Starter
New Member
Re: Bank Simulator ~ Help
Hmmm, when i click deposit 20 and look at balances it says 1020 im like okay, i went back and added another 80, all it says is 1080, it wont add to it, it will tell u what u recently added, i want it to add alltogether
the coding on deposit is
Private Sub cmd100_Click()
Balances.lblbalance.Caption = Val(Balances.lblbalance.Caption) + 100
End Sub
Private Sub cmd20_Click()
Balances.lblbalance.Caption = Val(Balances.lblbalance.Caption) + 20
End Sub
Private Sub cmd40_Click()
Balances.lblbalance.Caption = Val(Balances.lblbalance.Caption) + 40
End Sub
Private Sub cmd80_Click()
Balances.lblbalance.Caption = Val(Balances.lblbalance.Caption) + 80
End Sub
Private Sub cmddone_Click()
Unload Me
Begin.Visible = True
End Sub
and balances code is just
Private Sub cmdcancel_Click()
Unload Me
Begin.Visible = True
End Sub
-
Jun 2nd, 2007, 09:11 PM
#18
PowerPoster
Re: Bank Simulator ~ Help
Don't forget to mark this one as resolved (and maybe give me some rep :-P)
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 2nd, 2007, 09:13 PM
#19
Thread Starter
New Member
Re: Bank Simulator ~ Help
wait answer that question plz and it isnt resolved some questions i ask b4 werent answer, just answer the one b4
-
Jun 3rd, 2007, 08:26 AM
#20
PowerPoster
Re: Bank Simulator ~ Help
There's no reason why pressing 80 and 20 wouldn't add 100...You might have to paste the whole project (form and other stuff) as an attachment so we can take a look
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Jun 3rd, 2007, 08:32 AM
#21
Re: Bank Simulator ~ Help
Is this assignment intended as an exercise on simply making GUI or an exercise on maintaining relevant data structures (eg. an array that contains transactions). If its the second case then you shouldn't be making GUI dependent calculations, GUI should be for data entry and display only... in line with the concept of n-tier design.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|