Results 1 to 4 of 4
  1. #1
    accesscoder is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    19

    Disabling textbox on reloading the form

    Hello everybody,



    This may sound very basic, but I was not able to do it.

    On form, I have 1 combobox, 'Diabetes' and 1 textbox 'Diabetes Start Age'. Initially 'Diabetes Start Age' is not enabled. If the value for 'Diabetes' combobox is 'Yes', then 'Diabetes Start Age' is enabled. Otherwise it is disabled. My problem here is when user selects 'Diabetes' as 'Yes' and enters 'Diabetes Start Age' and saves the data, after that, I want 'Diabetes Start Age' to be again in disabled state, however it is remaining in enabled state after saving.

    Can you please throw some light on this?

    I appreciate your help!

    Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    This is the type of situation where you need the code in two places: the after update event of the control the test is based on, and the current event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    accesscoder is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    19
    Thank you, pbaldy!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Create Textbox with VBA in an existing form
    By ferrarih in forum Forms
    Replies: 0
    Last Post: 02-24-2010, 06:17 AM
  2. Replies: 1
    Last Post: 02-04-2010, 01:15 PM
  3. multiple textbox in a form
    By iamraja5 in forum Programming
    Replies: 2
    Last Post: 01-26-2010, 10:53 AM
  4. Replies: 0
    Last Post: 10-12-2009, 08:26 AM
  5. Replies: 0
    Last Post: 09-23-2009, 10:52 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