Re: What happens when data in control is updated
- From: Ted <Ted@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Dec 2005 14:04:02 -0800
first off, thanks for the interest!
in the interim, i've dug out some heavy reading material on a2k development
and been reading about 'recordsets'....
but, i'm not sure i understand all your concerns in the response you post.
future_visit is not computed in this particular; it is computed in a
predecessor query (query3) which used yet another query (the one i coined
'Sort by Month'). suffice it to say that in query3, there is a unique record
for every lastname which corresponds with a nextvisit date.
i think i actually did try putting the criterion
[Forms]![Screening Log]![On-Study Date]
in query5 under onstudydate and that that had no effect, so i figured i
could assign/pass it in to the query when i wrote it as expressed in my SQL
code. by saying [Forms]![Screening Log]![On-Study Date] AS [On-Study Date] i
figured it would have the effect of giving Query5 the ability to use the
revised value of On-Study Date.
"tina" wrote:
> well, at best your SQL would return the date from the form as a static value
> in every record returned by the query. it's not included in the WHERE
> clause, or in any calculated field in the query, so i don't see how it's
> being "used" in calculating a future_visit date.
>
> what is the basis of the future_visit value? are you adding x number of days
> or months to the onstudydate value?
>
> hth
>
>
> "Ted" <Ted@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:467526E2-496F-4F67-B74F-14CF27FE5781@xxxxxxxxxxxxxxxx
> > to this newbie, that seems like a viable question to ask, so if you're
> > laughing, perhaps you ought to be reading another posting....
> >
> > anyway, my point is to do with the availability of the 'new' value in a
> text
> > control (date) whilst the user is contuing to use/view the information on
> the
> > form housing the text control which he modified; e.g. i have a date
> control
> > that takes the 'onstudydate' of a person and want to compute the
> > 'futurevisit' date based on it. both values appear as date controls on the
> > same form.
> >
> > perhaps this is getting too far afield of the subject heading, but my vba
> > code looks like
> >
> > Private Sub On_Study_Date_AfterUpdate()
> > Dim Future_Visit As Date
> > Dim On_Study_Date As Date
> >
> > If Me.Dirty Then
> > If Not IsNull(Me.IRB_) Then
> > Me.Future_Visit.Enabled = True
> > Me.Future_Visit.Locked = False
> > Me.Future_Visit.SetFocus
> > Me.Future_Visit.Value = DLookup("FollowUp", "Query5")
> > Me.On_Study_Date.SetFocus
> > Me.Future_Visit.Enabled = False
> > Me.Future_Visit.Locked = True
> > ' Me.Future_Visit.Value = "01/01/1900"
> > End If
> > End If
> > End Sub
> >
> >
> > and the Query5 SQL code reads thusly:
> >
> > SELECT S.[Last Name], S.[First Name], S.[IRB#], S.[Study #], S.[Seq#],
> > S.Months, [Forms]![Screening Log]![On-Study Date] AS [On-Study Date],
> > S.Schedule, S.[F/U Status], S.FollowUp
> > FROM [Sort By Month] AS S INNER JOIN Query3 AS Q ON (S.[Last Name] =
> Q.[Last
> > Name]) AND (S.FollowUp = Q.NextVisit)
> > WHERE (((S.[Last Name])=[Forms]![Screening Log]![Last Name]));
> >
> > i wish i could figure out how to use the newly entered on-study date
> > information in this vba to compute the desire value of future_visit's.
> using
> >
> > [Forms]![Screening Log]![On-Study Date] AS [On-Study Date]
> >
> > in the SQL code did not have the 'intended' effect, i.e. 'passing' the
> > updated value to the query.
> >
> > any help'd be welcome.
> >
> >
> >
>
>
>
.
- Follow-Ups:
- References:
- Prev by Date: RE: convert text file
- Next by Date: Re: Defining Prodecures
- Previous by thread: Re: What happens when data in control is updated
- Next by thread: Re: What happens when data in control is updated
- Index(es):
Relevant Pages
|