HockeyNut
Tureco Del Hockey
- Local time
- Today, 11:00
- Joined
- Feb 25, 2003
- Messages
- 62
This is the code I have an issue with.
Btw, is that the right HTML Tag to use to get my code to appear correctly? [ CODE ] ?
Anyway, back to my problem.
The code works, in so much as it enables/disables the appropriate fields on the form, depending on the selection of the cboClientType combo. However, if I then flick onto the next record, the same fields (from the previous record) are disabled/enabled regardless of what is selected in the cboClientType. I assume this is because the code is attached to the "cboClientType_AfterUpdate" event.
Can anyone give me any advise as to the best way to resolve this problem?
Kind regards,
HN.
Code:
Private Sub cboClientType_AfterUpdate()
Me.cboClientType.SetFocus
Me.txtEstablishmentName.Enabled = (Me.cboClientType.Text = "Establishment")
Me.txtBirthdate.Enabled = (Me.cboClientType.Text = "Individual")
Me.txtDeceased.Enabled = (Me.cboClientType.Text = "Individual")
End Sub
Btw, is that the right HTML Tag to use to get my code to appear correctly? [ CODE ] ?
Anyway, back to my problem.
The code works, in so much as it enables/disables the appropriate fields on the form, depending on the selection of the cboClientType combo. However, if I then flick onto the next record, the same fields (from the previous record) are disabled/enabled regardless of what is selected in the cboClientType. I assume this is because the code is attached to the "cboClientType_AfterUpdate" event.
Can anyone give me any advise as to the best way to resolve this problem?
Kind regards,
HN.