On Change

rgreene

Registered User.
Local time
Today, 21:29
Joined
Jan 22, 2002
Messages
168
Can any one tell me why this wouldn't/doesn't work?

Private Sub fee_label_Change()

If Me.fee_label = "Adult Registration: No t-shirt (Early)" Then
Me.fee = 10

ElseIf Me.fee_label = "Adult Registration with t-shirt (Early)" Then
Me.fee = 20

ElseIf Me.fee_label = "Adult Registration with t-shirt (Late)" Then
Me.fee = 25

ElseIf Me.fee_label = "Adult Registration: No t-shirt (Late)" Then
Me.fee = 15

ElseIf Me.fee_label = "Kids under 13: No t-shirt" Then
Me.fee = 10

ElseIf Me.fee_label = "Kids under 13 with t-shirt" Then
Me.fee = 13
End If

End Sub

it used to but I had to change the labels and now it doesn't populate the fee column.

Thanks in advance.
Rick
 
Rick, I am thing the choice of event for changing the value is not the best.. I hope the Fee_Label is a ComboBox.. So try the AfterUpdate event..
 
Yes the Fee_Label is a ComboBox. I originally had it set with the AfterUpdate event but that didn't work either. So I was trying it on the On Change just to see if that made a difference. But I will put it back to the AfterUpdate.
 
If that is the case then make sure the ComboBox is returning that String.. Normally ComboBoxes, have their RowSource from a Table/Query which will have a (hidden) first column that might be a Number, so the If statement would fail..

So try, debugging by adding MsgBox and see what value is returned..
 
Thank You SOOOOOO much that was it. I changed to the row source of my lookup table and that did it..

Can't thank you enough!!
 
Glad you have it sorted..
Can't thank you enough!!

attachment.php


Now you can.. :D
 

Attachments

  • thanks.png
    thanks.png
    13.6 KB · Views: 718

Users who are viewing this thread

Back
Top Bottom