Re: Display hidden field in a continuous form after update of a null m
- From: "Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 11 Feb 2007 06:04:53 -0800
If I'm following the logic of what your code is doing, the dtmComplete
control is set invisible when the form loads. Then, after the memo control
is updated (and ONLY after an update), if the memo field is null (are you
also testing for a zero-length string somewhere else?), set the dtmComplete
invisible, otherwise, set it visible.
To me this means the form will always start out with an invisible
dtmComplete, even if the record that is loaded has something in the memo
control.
If you want these things to change whenever the record changes, try the
OnCurrent event to re-evaluate the condition of the memo control.
By the way, having controls blink in and out of existence (i.e., visible)
can be disconcerting to users. Consider setting the enabled property
instead, so the control is grayed out or not.
--
Regards
Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
Microsoft Registered Partner
https://partner.microsoft.com/
"mogll" <mogll@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1274EE75-A111-4E64-9BD9-91278A3129CC@xxxxxxxxxxxxxxxx
In a continuous form, I have fields memAction and dtmComplete. I do notwant
users to enter a completion date if the memAction field is null. So I wantpermanently
the date field initially hidden for each record, then displayed
by record when the memo field is not null. I have tried the followingwith
no luck:
Form On Load
Private Sub Form_Load()
Me.dtmComplete.Visible = False
End Sub
Memo field after update
Private Sub memAction_AfterUpdate()
If Me.memAction Is Null Then
Me.dtmComplete.Visible = False
Else
Me.dtmComplete.Visible = True
End If
End Sub
Help
.
- Prev by Date: Re: Changing Font Colour
- Next by Date: Showing multiple interactions for multiple contacts from a single company
- Previous by thread: Re: Changing Font Colour
- Next by thread: Re: modify this code
- Index(es):
Relevant Pages
|