Results 1 to 5 of 5
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    active = true on data entry (simple)

    forms 102 (yet i always get tricked-up on this one)

    as soon as the user starts to enter data into a textbox, I'd like for a command button to go active (first checking that there actually is an entry vs. a null, or empty data...)


    ? on what textbox event ought the code execute on; and is there any proactive code that ought to be also included in the method (me.dirty = false ?)



    as always, with appreciation in advance;
    stay safe,
    m.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What is the purpose of the button? Do you want it visible regardless of the textbox value?

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    yes - visible at all times

    visible to let them know that once they fill in data the action will be possible
    not active to let them know they can't... until they fill in certain data (just like when you're shopping online, and you can't confirm an order till all the *required fields have been completed has been filled in...)

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    The BeforeUpdateEvent of the form is last chance to edit before record is saved. So, validation, verification of control values would be done there. You can cancel the update if there are errors, OR you could enable the button.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Textbox also has BeforeUpdate event that can be used to immediately validate its input. Use textbox AfterUpdate event to enable/disable other controls.

    Use Me.Dirty = False if you want to commit record edits to table.
    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.

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

Similar Threads

  1. simple data entry database
    By didiomm in forum Database Design
    Replies: 2
    Last Post: 08-27-2016, 06:37 AM
  2. Replies: 8
    Last Post: 04-23-2015, 08:36 PM
  3. Simple Data Entry
    By CWest in forum Access
    Replies: 38
    Last Post: 07-22-2014, 01:01 PM
  4. Replies: 1
    Last Post: 01-06-2014, 06:19 PM
  5. Advice for simple data entry form
    By Fuergrissa in forum Access
    Replies: 4
    Last Post: 04-23-2013, 10:41 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