Hi
The value of a combo box (cboSourceOpp) makes some following controls
invalid. I grey out the invalid controls as follows:
If Me!cboSourceOpp = "Other" Then
Me!OtherNotes.Enabled = True
Me!ContactNotes.Enabled = False
Me!cboOrganisationName.Enabled = False
ElseIf Me!cboSourceOpp = "Contact" Then
Me!OtherNotes.Enabled = False
Me!ContactNotes.Enabled = True
Me!cboOrganisationName.Enabled = True
ElseIf Me!cboSourceOpp = "Networking" Then
Me!OtherNotes.Enabled = False
Me!ContactNotes.Enabled = False
Me!cboOrganisationName.Enabled = False
ElseIf Me!cboSourceOpp = "Formal Tender" Then
Me!OtherNotes.Enabled = False
Me!ContactNotes.Enabled = False
Me!cboOrganisationName.Enabled = False
End If
This works while entering data, but there is a problem when browsing through
records. It seems that the enabled true / false setting for whichever record
was last accessed remains for all of them - so, a record with an entry in
SourceOpp of 'Other' will enable 'othernotes' while the data is being
entered, if I go back to look at that record later, 'othernotes' may be
greyed out. What am I doing wrong? Can anyone help?
thanks
Ofer Cohen - 21 Aug 2006 14:49 GMT
You can either set this code on the OnCurrent event of the form, or better,
call the AfterUpdate event of the Combo (where I assume this code is located
in) in the OnCurrent event of the form
Call ComboName_AfterUpdate()
That way you need to maintain the code in only one place.

Signature
Good Luck
BS"D
> Hi
>
[quoted text clipped - 31 lines]
>
> thanks
Jenny - 21 Aug 2006 15:01 GMT
Thank you so much - I used Call ComboName_AfterUpdate() in the OnCurrent
event and that works fine.
Jenny
> You can either set this code on the OnCurrent event of the form, or better,
> call the AfterUpdate event of the Combo (where I assume this code is located
[quoted text clipped - 40 lines]
> >
> > thanks