Results 1 to 3 of 3
  1. #1
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164

    Form events and showing/hiding controls

    Hello Everyone,

    I am running into a persistent little problem with one of my more used forms. I have a form that is used to track a whole variety of what are referred to as Change Requests. Most of these requests require only a few fields to be entered but one requires a whole host of additional fields (12 to be specific). I have some code written that hides the text box, combo box, and label controls on the form unless the correct request type (referred to as 'Form', selected by Formcbo - I know this may be confusing) is selected in the appropriate combo box. I then dropped this code into the On Current, On Load, and On Open events for the general form as well as the After Update event for the combo box where the request type is selected. This is working as expected for the most part. However, when I am in a record that necessitates the extra fields and I click the button to generate a new record, I still get all the fields! I thought this would be handled by the On Load event but apparently that isn't doing the trick. Does anyone have any suggestions for another event to handle this?



    Thanks!
    Ryan

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    are you using the default navigation buttons or are you using your own button that goes to a new record?

    If you're using the default navigation buttons I don't think there's an easy way to make your 'extra' controls disappear. What you might consider is creating your own 'New Record' button and attaching code to it to make the controls invisible or visible as the situation occurs.

  3. #3
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164
    I have my own set of navigation buttons that include Previous Record, Delete Record, New Record, Search, and Next Record. However, most of my users simply user the search window in the Record bar at the bottom of the form. I've tried the Lost Focus event but that doesn't seem to do the trick either.

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

Similar Threads

  1. Blank Popup form - not showing any controls
    By Williams485 in forum Forms
    Replies: 9
    Last Post: 03-06-2013, 09:20 AM
  2. Replies: 1
    Last Post: 07-13-2012, 09:13 AM
  3. Showing/Hiding Navigation Buttons in VBA or Macro
    By chris.williams in forum Forms
    Replies: 3
    Last Post: 11-15-2011, 10:38 AM
  4. Hiding controls
    By gg80 in forum Forms
    Replies: 3
    Last Post: 05-21-2011, 03:21 PM
  5. Multiple image controls isn't showing
    By Jamy in forum Reports
    Replies: 0
    Last Post: 02-23-2010, 04:55 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