Re: Real beginner in here
Some more information would be fantastic.
Like what else is in your form, is it say like two textboxes and a button.
One TextBox for Donation amount, and one for Receipt Number
and then maybe a print button or something??
If your case is something like that then you could:
Code:
'in general declarations
Dim ReceiptNumber as Integer
Private Sub cmdPrint_Click()
ReceiptNumber = ReceiptNumber + 1
txtboxRNum = ReceiptNumber
end sub
Also, if your not always running this program, and well probably a good idea anyway, you could store this number in a text file.
Code:
Open "ReceiptNumber.txt" For Output As #1
Print #1, ReceiptNumber
Close #1
'and to bring it in on load
Private Sub Form_Load()
Open "ReceiptNumber.txt" For Input As #1
Line Input #1, ReceiptNumber
Close #1
txtboxRNum = ReceiptNumber
End Sub
I hope this helps at least some.
Re: Real beginner in here
Quote:
Originally Posted by pamela
...code in VB to create a receipt form in Crystal reports...
There is a special Forum here for Crystal reports. IMHO this maybe is more a Crystal Report project as you described it. Or it is a mixed one. But I could imagine that your problem to put numbers in that Form which adds up automatically is maybe a thing easier done in Crystel Reports itself. But its only my opinion, because I never tried Crystal Reports. So as a hint: additional ask there