Results 1 to 6 of 6
  1. #1
    Madmax is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    80

    Unbound checkbox's that update

    Good Afternoon,

    Is there a way to setup checkbox's that are unbound but update based off whether a field has a date in it or not? The idea is it auto updates a checklist on the right that shows the correct order to do something but the left where the date is at is split up by who's responsible to do what. Just want to show a check mark if there is a date in the field. If the field is null then the check box is unmarked. Auto both ways soon as the field updates. Thoughts on how to do this?

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Madmax -

    If using this just for a form, you could try...

    If IsDate(Me![DateField]) =True then
    Me![CheckBoxName]=-1
    else
    Me![CheckBoxName]= 0
    end if

    You may need to put this code into the AfterUpdate Event of the date field and the Current Event of the form. You would need to use the Current Event because of the unbound nature of the control.

    All the best,

    Jim

  3. #3
    Madmax is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    80
    You said it had to be put in the current event for the form. What if I am going to use this more than once for different date fields and check marks. Will I have to put each of them in the current event for the form for each check mark as well as the update on the field for each field? I dont mind just dont want to mess it up

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The Current event code is to correctly set the controls when you first move to a record. If you do anything on the form, such as data entry, that influences the settings, would need code in the AfterUpdate event of the triggering control.
    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.

  5. #5
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Madmax -

    As June7 indicated, the current event fires when you first navigate to a particular record and the afterupdate event fires when data is changed/added to a control at form level. So, unfortunately, you would have to add code for each control where you want this behavior to occur.

    So, how many controls are you talking about? Depending on that number, a different logic structure might also be needed.

    Let me know...

    Jim

  6. #6
    Madmax is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    80
    Between 5 and 15 for different forms. Idea is to give a visual representation that its complete without actually bothering with storing useless data for my officers.

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

Similar Threads

  1. Unbound list box
    By waseemthonse in forum Forms
    Replies: 1
    Last Post: 11-02-2010, 07:36 PM
  2. Unbound form example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:25 AM
  3. Replies: 0
    Last Post: 05-09-2010, 08:43 AM
  4. Multi Update By Checkbox
    By Nsquared in forum Forms
    Replies: 3
    Last Post: 02-10-2010, 03:08 PM
  5. Checkbox to update value
    By Wrangler in forum Forms
    Replies: 1
    Last Post: 01-03-2006, 06:34 PM

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