Welcome to SPN

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

Sign Up Now!

Script for Text Box

Discussion in 'Information Technology' started by Bob, Jul 28, 2006.

Tags:
  1. Bob

    Bob
    Expand Collapse
    Guest

    This is what I would like added to my textbox:
    [cbStatus]="Finished" This text box to be Blank


    Thanks in advance.........Bob Vance
     
  2. Loading...

    Similar Threads Forum Date
    General On Scriptures Blogs Sep 27, 2016
    Which "Three Inscriptions" Are Recorded? Intellectual Translations by SPNers Oct 11, 2015
    Where are the 1984 manuscripts? Hard Talk Jun 6, 2015
    Heritage SGPC to use latest technology to preserve Sikh scriptures History of Sikhism Jan 23, 2014
    The Heart of the Matter Part 1 (Video and Transcript) - the myth of saturated fat? Health & Nutrition Oct 26, 2013

  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Taking your question at face value:

    Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"

    (replace MyTextBox with the actual name of your text box)

    If that's not what you mean, post back with a better explanation.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Bob" <xxx@xx.xx> wrote in message news:e8ce00$bvq$1@lust.ihug.co.nz...
    >
    > This is what I would like added to my textbox:
    > [cbStatus]="Finished" This text box to be Blank
    >
    >
    > Thanks in advance.........Bob Vance
    >
    >
     
  4. Bob

    Bob
    Expand Collapse
    Guest

    Thanks Douglas great, can this script be slightly altered so as anything my
    than 10 years returns a Blank "" no result

    =IIf([cbDateOfBirth]="" Or
    IsNull([cbDateOfBirth]),"",funCalcAge(Format("01-Aug-" &
    [cbDateOfBirth],"dd/mm/yyyy"),Format(Now(),"dd/mm/yyyy"),1))

    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:OGhpxO2nGHA.4124@TK2MSFTNGP03.phx.gbl...
    > Taking your question at face value:
    >
    > Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"
    >
    > (replace MyTextBox with the actual name of your text box)
    >
    > If that's not what you mean, post back with a better explanation.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Bob" <xxx@xx.xx> wrote in message news:e8ce00$bvq$1@lust.ihug.co.nz...
    >>
    >> This is what I would like added to my textbox:
    >> [cbStatus]="Finished" This text box to be Blank
    >>
    >>
    >> Thanks in advance.........Bob Vance
    >>
    >>

    >
    >
     
  5. Bob

    Bob
    Expand Collapse
    Guest

    Thanks Douglas great, can this script be slightly altered so as anything
    (more)
    than 10 years returns a Blank "" no result

    "Bob" <xxx@xx.xx> wrote in message news:e8esdi$q8k$1@lust.ihug.co.nz...
    > Thanks Douglas great, can this script be slightly altered so as anything
    > my than 10 years returns a Blank "" no result
    >
    > =IIf([cbDateOfBirth]="" Or
    > IsNull([cbDateOfBirth]),"",funCalcAge(Format("01-Aug-" &
    > [cbDateOfBirth],"dd/mm/yyyy"),Format(Now(),"dd/mm/yyyy"),1))
    >
    > "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:OGhpxO2nGHA.4124@TK2MSFTNGP03.phx.gbl...
    >> Taking your question at face value:
    >>
    >> Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"
    >>
    >> (replace MyTextBox with the actual name of your text box)
    >>
    >> If that's not what you mean, post back with a better explanation.
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >> "Bob" <xxx@xx.xx> wrote in message news:e8ce00$bvq$1@lust.ihug.co.nz...
    >>>
    >>> This is what I would like added to my textbox:
    >>> [cbStatus]="Finished" This text box to be Blank
    >>>
    >>>
    >>> Thanks in advance.........Bob Vance
    >>>
    >>>

    >>
    >>

    >
    >
     
  6. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Assuming you mean that anything more than 10 years, try:

    IIf(DateAdd("yyyy", -10, Date()) > Nz([cdDateOfBirth], #1/1/100#), "", ???)

    ??? means I'm not sure what you want if the age is less than 10. I have no
    idea what your funCalcAge is supposed to be doing.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Bob" <xxx@xx.xx> wrote in message news:e8esdi$q8k$1@lust.ihug.co.nz...
    > Thanks Douglas great, can this script be slightly altered so as anything
    > my than 10 years returns a Blank "" no result
    >
    > =IIf([cbDateOfBirth]="" Or
    > IsNull([cbDateOfBirth]),"",funCalcAge(Format("01-Aug-" &
    > [cbDateOfBirth],"dd/mm/yyyy"),Format(Now(),"dd/mm/yyyy"),1))
    >
    > "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:OGhpxO2nGHA.4124@TK2MSFTNGP03.phx.gbl...
    >> Taking your question at face value:
    >>
    >> Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"
    >>
    >> (replace MyTextBox with the actual name of your text box)
    >>
    >> If that's not what you mean, post back with a better explanation.
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >> "Bob" <xxx@xx.xx> wrote in message news:e8ce00$bvq$1@lust.ihug.co.nz...
    >>>
    >>> This is what I would like added to my textbox:
    >>> [cbStatus]="Finished" This text box to be Blank
    >>>
    >>>
    >>> Thanks in advance.........Bob Vance
    >>>
    >>>

    >>
    >>

    >
    >
     
  7. Bob

    Bob
    Expand Collapse
    Guest

    Thanks, Where do I put this script?

    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:umXLSi8nGHA.4728@TK2MSFTNGP03.phx.gbl...
    > Assuming you mean that anything more than 10 years, try:
    >
    > IIf(DateAdd("yyyy", -10, Date()) > Nz([cdDateOfBirth], #1/1/100#), "",
    > ???)
    >
    > ??? means I'm not sure what you want if the age is less than 10. I have no
    > idea what your funCalcAge is supposed to be doing.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Bob" <xxx@xx.xx> wrote in message news:e8esdi$q8k$1@lust.ihug.co.nz...
    >> Thanks Douglas great, can this script be slightly altered so as anything
    >> my than 10 years returns a Blank "" no result
    >>
    >> =IIf([cbDateOfBirth]="" Or
    >> IsNull([cbDateOfBirth]),"",funCalcAge(Format("01-Aug-" &
    >> [cbDateOfBirth],"dd/mm/yyyy"),Format(Now(),"dd/mm/yyyy"),1))
    >>
    >> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    >> news:OGhpxO2nGHA.4124@TK2MSFTNGP03.phx.gbl...
    >>> Taking your question at face value:
    >>>
    >>> Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"
    >>>
    >>> (replace MyTextBox with the actual name of your text box)
    >>>
    >>> If that's not what you mean, post back with a better explanation.
    >>>
    >>> --
    >>> Doug Steele, Microsoft Access MVP
    >>> http://I.Am/DougSteele
    >>> (no e-mails, please!)
    >>>
    >>>
    >>> "Bob" <xxx@xx.xx> wrote in message news:e8ce00$bvq$1@lust.ihug.co.nz...
    >>>>
    >>>> This is what I would like added to my textbox:
    >>>> [cbStatus]="Finished" This text box to be Blank
    >>>>
    >>>>
    >>>> Thanks in advance.........Bob Vance
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
  8. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    No idea, since you haven't told me what you're trying to do with it! <g>

    Seriously, that expression could be used as a computed cell in a query, it
    could be used as the control source for a text box (put an equal sign in
    front of it in that case), or it could be included as code within a function
    or sub (such as the AfterUpdate event for the Date of Birth text box, or the
    Current event for the form)

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Bob" <xxx@xx.xx> wrote in message news:e8f11l$2vj$1@lust.ihug.co.nz...
    > Thanks, Where do I put this script?
    >
    > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:umXLSi8nGHA.4728@TK2MSFTNGP03.phx.gbl...
    > > Assuming you mean that anything more than 10 years, try:
    > >
    > > IIf(DateAdd("yyyy", -10, Date()) > Nz([cdDateOfBirth], #1/1/100#), "",
    > > ???)
    > >
    > > ??? means I'm not sure what you want if the age is less than 10. I have

    no
    > > idea what your funCalcAge is supposed to be doing.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no private e-mails, please)
    > >
    > >
    > > "Bob" <xxx@xx.xx> wrote in message news:e8esdi$q8k$1@lust.ihug.co.nz...
    > >> Thanks Douglas great, can this script be slightly altered so as

    anything
    > >> my than 10 years returns a Blank "" no result
    > >>
    > >> =IIf([cbDateOfBirth]="" Or
    > >> IsNull([cbDateOfBirth]),"",funCalcAge(Format("01-Aug-" &
    > >> [cbDateOfBirth],"dd/mm/yyyy"),Format(Now(),"dd/mm/yyyy"),1))
    > >>
    > >> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > >> news:OGhpxO2nGHA.4124@TK2MSFTNGP03.phx.gbl...
    > >>> Taking your question at face value:
    > >>>
    > >>> Me.MyTextBox = "[cbStatus]=""Finished"" This text box to be Blank"
    > >>>
    > >>> (replace MyTextBox with the actual name of your text box)
    > >>>
    > >>> If that's not what you mean, post back with a better explanation.
    > >>>
    > >>> --
    > >>> Doug Steele, Microsoft Access MVP
    > >>> http://I.Am/DougSteele
    > >>> (no e-mails, please!)
    > >>>
    > >>>
    > >>> "Bob" <xxx@xx.xx> wrote in message

    news:e8ce00$bvq$1@lust.ihug.co.nz...
    > >>>>
    > >>>> This is what I would like added to my textbox:
    > >>>> [cbStatus]="Finished" This text box to be Blank
    > >>>>
    > >>>>
    > >>>> Thanks in advance.........Bob Vance
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
     

Share This Page