Results 1 to 3 of 3
  1. #1
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151

    Which event to have VBA code to hide fields

    I have fields on a form which visible is False if a check box is chosen. I have this code in the "Form Load" event as well as on the checkbox for "On Click" event.

    My issue is when I scroll to the next record, even if the checkbox has a check, the code to display and hide certain fields isn't working. I tried adding the code the form event "On Selection Change" as well as "After Update" but it isn't working.



    I know I can add this code to the buttons I have for record selection, but then I would have to have it for the previous, next, first and last. Is there an event on the form so that it will work as I scroll through each record.

    Thanks,

    Sam

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,413
    use the form current event rather than the load event

  3. #3
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    Thanks. That worked.

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

Similar Threads

  1. hide ribbon code error
    By Jen0dorf in forum Access
    Replies: 4
    Last Post: 12-03-2015, 07:10 AM
  2. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  3. Replies: 6
    Last Post: 01-24-2013, 03:15 PM
  4. Replies: 2
    Last Post: 06-06-2012, 10:53 AM
  5. jzwp11 Code - Visible/Hide fields
    By GraemeG in forum Programming
    Replies: 19
    Last Post: 02-17-2011, 11:30 AM

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