Nightshade
New member
- Local time
- Today, 06:49
- Joined
- Nov 26, 2008
- Messages
- 4
I am creating a database for a church. In my event form I have a combo box that will allow the user to select the various events the church is involved in. One of those events types is called Pastoral Calling and with that specific event the pastor needs to keep track of his mileage for reimbursement by the church and tax purposes.
There is a text box in the form for the pastor to enter his mileage for the Pastoral Calling. I want to lock this text box so it will not be possible to enter any data in this textbox unless the Pastoral Calling is selected in the event list combo box. Here is the code.
The same code also exists for the On Current event. The problem is when I selected pastoral calling in the combo box and tried to enter numbers in the mileage text box nothing happens and it behaves as if it is a locked text box. I know I am missing something but I can't figure out what. Any ideas?
P.S. Oh and I tried the on click event as well, same results.
There is a text box in the form for the pastor to enter his mileage for the Pastoral Calling. I want to lock this text box so it will not be possible to enter any data in this textbox unless the Pastoral Calling is selected in the event list combo box. Here is the code.
Code:
Private Sub cboEventType_AfterUpdate()
'On after selection update of the event type in Event form
'Check if Event Type: Pastoral Call is selected
'Then lock or unlock the Mileage textbox
If Me.cboEventType = "Pastoral Call" Then
Me.txtMileage.Locked = False
Else
Me.txtMileage.Locked = True
End If
End Sub
P.S. Oh and I tried the on click event as well, same results.