Results 1 to 3 of 3
  1. #1
    KWarzala is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    35

    multiple conditionally visible fields

    Hello,



    I have a form with 5 fields (date, time, person, area, location) and a button to assign a case number.

    Before the person can get a case number, they must have all 5 fields filled out, if they don't, they get a message box asking them to fill out all the fields.

    I'm trying to figure out code to make an arrow visible for each field that IsNull.

    I tried:

    If IsNull([date]) then
    me.arrow1.visible = true
    Else: me.arrow1.visible = false
    end if
    if IsNull([time]) then
    me.arrow2.visible = true
    Else: me.arrow2.visible = false
    end if
    etc..

    I also tried:

    If IsNull([date]) then
    me.arrow1.visible = true
    If IsNull([time]) then
    me.arrow2.visible = true
    (etc)
    end if
    end if

    each time only the first arrow showed, any help on this would be greatly appreciated!

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Looks like the first code should work but don't bother with If Then, just:

    Me.arrow1.Visible = IsNull([date])

    Me.arrow2.Visible = IsNull([time])

    Consider using Conditional Formatting. If the field Is Null then show red back color.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    KWarzala is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Sep 2009
    Posts
    35
    wow, of course it was that simple!

    Thank you, you saved me from hours of frustration

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Visible Fields in Report if field=x
    By chris.williams in forum Reports
    Replies: 8
    Last Post: 09-05-2012, 03:49 PM
  2. Conditionally Required Fields
    By HawkGuru in forum Programming
    Replies: 6
    Last Post: 10-03-2011, 05:47 AM
  3. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  4. Report showing non-visible fields
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 09-21-2010, 09:40 AM
  5. Replies: 0
    Last Post: 03-08-2009, 05:12 PM

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
  •  
Other Forums: Microsoft Office Forums