Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Conditional Control Source Selection

Discussion in 'Information Technology' started by Ted, Nov 17, 2005.

  1. Ted

    Ted
    Expand Collapse
    Guest

    here's my quandry....

    let's say i hava an a2k app. let's say there's a form and the bound controls
    that interest us are MR_Number (medical record number), IRB_Number (the
    number of a clinical experiment on which a patient is enrolled),
    RegisteredDate (the date on which the patient was registered on the
    IRB_Number) and FollowUpDate (the next scheduled follow-up visit date), and
    lastly a field called ECOG (don't worry about what it means---it's binary
    e.g. Yes/No). i don't know if this aspect of the situation is all that
    important, but the same MR_Number can appear on more than one IRB_Number (but
    not at the same time--this would happen if a patient dropped out of an
    experiment for some reason and then managed to be re-enrolled in a different
    one later on).

    let's say that the default value of ECOG's is "Yes" for each patient. when
    it's 'Yes', then the control source for FollowUpDate would be a certain query
    and that when it's "No" that the control source for FollowUpDate would be a
    different query. in each case a date value would be entered into FollowUpDate
    but it would be computed using slightly different follow-up schedules.

    is this doable?
     
  2. Loading...

    Similar Threads Forum Date
    Inspirational Unconditional love for the Guru Videos Sep 4, 2010
    General Unconditional Love Hard Talk Jun 28, 2008
    Pure and Unconditional Love for God Gurmat Vichaar Feb 18, 2008
    How To Control The 5 Thieves? Questions and Answers Apr 7, 2016
    General Controlling Kaam (Lust) Hard Talk Apr 8, 2014

  3. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    In the Form "Current Event" and the ECOG "After Update Event"
    you can put code to change the control source and/or rowsource
    and/or default value for FollowUpDate.

    Or you can write a query for FollowUpDate that refers to
    Forms!myform!ECOG as a field or criteria.

    (david)

    "Ted" <Ted@discussions.microsoft.com> wrote in message
    news:7EACCA41-6FB6-4C2B-9F46-6BEF688F91CD@microsoft.com...
    > here's my quandry....
    >
    > let's say i hava an a2k app. let's say there's a form and the bound
    > controls
    > that interest us are MR_Number (medical record number), IRB_Number (the
    > number of a clinical experiment on which a patient is enrolled),
    > RegisteredDate (the date on which the patient was registered on the
    > IRB_Number) and FollowUpDate (the next scheduled follow-up visit date),
    > and
    > lastly a field called ECOG (don't worry about what it means---it's binary
    > e.g. Yes/No). i don't know if this aspect of the situation is all that
    > important, but the same MR_Number can appear on more than one IRB_Number
    > (but
    > not at the same time--this would happen if a patient dropped out of an
    > experiment for some reason and then managed to be re-enrolled in a
    > different
    > one later on).
    >
    > let's say that the default value of ECOG's is "Yes" for each patient. when
    > it's 'Yes', then the control source for FollowUpDate would be a certain
    > query
    > and that when it's "No" that the control source for FollowUpDate would be
    > a
    > different query. in each case a date value would be entered into
    > FollowUpDate
    > but it would be computed using slightly different follow-up schedules.
    >
    > is this doable?
     
  4. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Ted" <Ted@discussions.microsoft.com> wrote

    > . . .
    > let's say that the default value of ECOG's is "Yes" for each patient.

    when
    > it's 'Yes', then the control source for FollowUpDate would be a certain

    query
    > and that when it's "No" that the control source for FollowUpDate would be

    a
    > different query. in each case a date value would be entered into

    FollowUpDate
    > but it would be computed using slightly different follow-up schedules.


    Just for the record: Control Source of a Control cannot be a Query; it is
    either a Field in the Form's RecordSource or an expression. That expression
    can be a Domain Aggregate Function such as DLookup, however, which can
    obtain its data by Querying the Table. But, a Calculated Control cannot be
    bound to a Field in the RecordSource, so you would have to jump through a
    hoop or two to save the value returned by a DLookup. And based on the ECOG,
    you could change the DLookup in this Control's Control Source.

    Larry Linson
    Microsoft Access MVP
     

Share This Page