|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
simple count
hey, i have been asked for my assigment to make a booking porgramme i have done the whole programme and all i need is to knowmake a simple count code where if the user clicks make booking then it adds one to the total bookings made. Each time the make booking is clickd it should add one to the counter and display it. Please help me as the followin code doesnt work
Private Sub Command1_Click() win = 0 If bookingsmade.Enabled = True Then win = win + 1 Label1.Caption = win End If End Sub |
|
#2
|
|||
|
|||
|
I'd say use an autonumber or identity column in your database.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
re:simple count
no u dnt understand im not using a database the booking to be printed out. so aftr each bookin is made it should add to a counter n when the programme closes it disays how many booking where made. (all on vb6)
|
|
#4
|
||||
|
||||
|
In your code, you are checking for bookingsmade.Enabled = True in order to add one to your counter. What kind of control is bookingsmade. I ask this because if all you want to do is increment the counter of bookings when a button is clicked, then write your code as follows.
Code:
Private Sub Command1_Click() win = win + 1 Label1.Caption = win End Sub Also make sure that your win variable is global so that it can be accessed by Command1. |
|
#5
|
|||
|
|||
|
But where are you storing these booking numbers, or do they just vanish when you close your program?
|
|
#6
|
|||
|
|||
|
simple count
i want to booking coming up in a msgbox when the programme is about it end. once a cmd button is clicked it adds one to the counter and when the programme is about to close it displays how many booking were made.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > simple count |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|