Hello,
I am making a form to keep track of a bunch of subscribers to a group. In the form I have created in Access 2000, I have it so you can input how many people are comming for tickets in one text box (Numsub). In the next box, you input how much it costs per ticket (AmtSub). Then I wanted it so you can click on a "calc" button and it will automatically insert the value of Numsub * AmtSub into Total. However it keeps telling me I can't assign a value to this object.
Does anyone know what I'm doing wrong?
Here is the code:
Private Sub Calculating_Click()
Dim Numb, Amount
Numb = Val(Numsub)
If Numb = "" Then
Numb = 0
End If
Amount = Val(AmtSub)
If Numb = "" Then
Numb = 0
End If
Total = " $" & Numb * Amount
End Sub
Thanks for your help in advance!!!
-Ovatvvon
I am making a form to keep track of a bunch of subscribers to a group. In the form I have created in Access 2000, I have it so you can input how many people are comming for tickets in one text box (Numsub). In the next box, you input how much it costs per ticket (AmtSub). Then I wanted it so you can click on a "calc" button and it will automatically insert the value of Numsub * AmtSub into Total. However it keeps telling me I can't assign a value to this object.
Does anyone know what I'm doing wrong?
Here is the code:
Private Sub Calculating_Click()
Dim Numb, Amount
Numb = Val(Numsub)
If Numb = "" Then
Numb = 0
End If
Amount = Val(AmtSub)
If Numb = "" Then
Numb = 0
End If
Total = " $" & Numb * Amount
End Sub
Thanks for your help in advance!!!
-Ovatvvon