I am creating an Access 2000 database for my wife's very small business. I have created a form for her to log her expenses. There is a combo box with common expense types called "TypeOfExpense". I wrote this simple code so that, for example, if "Parking" were selected from the list a text box called "Origin" would no longer be visible as it would not be applicable to a parking expense. Here's the code:
Private Sub TypeOfExpense_Change()
If Me.TypeOfExpense.Value = "Parking" Then
Me.Origin.Visible = False
Else
Me.Origin.Visible = True
End If
End Sub
The code works too well. All the "Origin" fields disappear on each record throughout my continuous form. How can I make the conditional apply to only the current record? Any help would be greatly appreciated and surely earn a star.
Thanks in advance.
kp
Private Sub TypeOfExpense_Change()
If Me.TypeOfExpense.Value = "Parking" Then
Me.Origin.Visible = False
Else
Me.Origin.Visible = True
End If
End Sub
The code works too well. All the "Origin" fields disappear on each record throughout my continuous form. How can I make the conditional apply to only the current record? Any help would be greatly appreciated and surely earn a star.
Thanks in advance.
kp