From: blake7 on
Hi Dirk,
Sorry for not explaining correctly and using a comment like "no luck" I have
placed your code where you stated and it works just fine, I need to learn
about where to put code as there are so many options available, will i get an
explanation in the help files?
Thanks again
Tony.
p.s one more question, is it possible to store the results of the code below
in a table field?, the code below is in a text box on my form. Thanks

=IIf(DateDiff("d",Date(),CVDate([Date Sent]))>14,"Overdue","Waiting")

"Dirk Goldgar" wrote:

> "blake7" <blake7(a)discussions.microsoft.com> wrote in message
> news:6E60B8E0-DD67-4F03-8BAF-810E68DEA031(a)microsoft.com...
> > Hi Dirk, tried this below but no luck, the default value of the frame63 is
> > 3,
> > the stored value of option66 is 1
> >
> > Private Sub Form_AfterUpdate()
> > If Me.Frame63.Value = 1 Then
> > Me.Text59.Visible = False
> > Else
> > Me.Text59.Visible = True
> > End If
> > End Sub
>
>
> It would help if you said exactly what you mean by "no luck". Do you get an
> error message? Does nothing at all happen, or does something happen that
> shouldn't?
>
> On the off chance that you are just using the wrong event for this, it seems
> to me that I might use the form's Current event and the option frame's
> AfterUpdate event for this. I would probably code those like this:
>
> '------ start of code ------
> Private Sub Form_Current()
>
> Me.Text59.Visible = (Nz(Me.Frame63, 0) <> 1)
>
> End Sub
>
> Private Sub Frame63_AfterUpdate()
>
> Me.Text59.Visible = (Nz(Me.Frame63, 0) <> 1)
>
> End Sub
> '------ end of code ------
>
>
>
>
>
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>
From: Dirk Goldgar on
"blake7" <blake7(a)discussions.microsoft.com> wrote in message
news:F2439EFF-FB98-472A-86CB-2EF45F87AAA1(a)microsoft.com...
> Sorry for not explaining correctly and using a comment like "no luck"

No problem, it just saves us from guessing.

> I have
> placed your code where you stated and it works just fine,

Very good.

> I need to learn
> about where to put code as there are so many options available, will i get
> an
> explanation in the help files?

Not directly, as there are too many different possibilities for what you
might be trying to accomplish. What you will find in the help file is a
description of the various events and when they fire. For example, see the
help topic, "Order of events for database objects". With that information,
you can consider which event or events are appropriate for a given process.

> p.s one more question, is it possible to store the results of the code
> below
> in a table field?, the code below is in a text box on my form. Thanks
>
> =IIf(DateDiff("d",Date(),CVDate([Date Sent]))>14,"Overdue","Waiting")

Why would you want to store that value in a field? The result of the
expression will change from one day to the next. It's normally a bad idea
to store calculated values, and while there are occasions where it is
necessary -- to preserve a snapshot of the calculation at a given time -- a
status that is based on the date would seem to be so ephemeral that I can't
understand why you would store it.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)