Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Exclamation Unanswered: Question with checkbox

    Hi,

    I need to do the following.

    When in my sub form an entry is Not Null a checkbox should check itself.

    Here is my current code:

    Code:
    If film_date_retour Is Not Null Then rendu.Value = 1
    My entry being "film_date_retour" and checkbox "rendu".

    Thanks

    Andreas

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try:
    Code:
    Sub Form_Current()
        Me.rendu.Value = Not IsNull(Me!film_date_retour)
    End Sub
    Have a nice day!

  3. #3
    Join Date
    Dec 2011
    Posts
    2

    Exclamation

    Thanks for reply!

    Unfortunately, that doesn't work.

    No error comes up but the checkbox doesn't check itself if a date in entered in "film_date_retour". Which it should.

    Maybe because we don't tell the checkbox to = 1?

    Andreas

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    set the check box to true or false (vbtrue or vbfalse) rather than a numeric value.
    place the code in the forms on current event or similar. you may need to place a call in each of the relevant form events to a single function that applies the setting.
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •