Results 1 to 11 of 11
  1. #1
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7

    Making a field non-editable after save

    Is there a way to make a field on a form not editable after the record is saved? Thanks so much

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can use the current event of the form and disable the control for the field if Not Me.NewRecord.

  3. #3
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7
    The field I want to make non editable is a combo box. I can't get it to work. Thanks so much.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Me.ComboBoxName.Enable = False

  5. #5
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7
    Thank you for your help. I put this on current and it highlights the "Enable" part in VB and says "Method or data memeber not found."

  6. #6
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7
    Ok. Thanks I got it to work. Me.ComboBoxName.Enabled = False (forgot the d in enabled). But now I can't enter new data. I think I need to do an if/then statement?

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Code:
    If Not Me.NewRecord Then
       Me.ComboBoxName.Enabled = False
    Else
      Me.ComboBoxName.Enabled = True
    End If

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Me.ComboBoxName.Enabled = Me.NewRecord

  9. #9
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7
    Yes! Thank you RuralGuy! I appreciate your time and help. This really made my work life a little simplier!

  10. #10
    carlyd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    7
    How do I post this as solved.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by carlyd View Post
    How do I post this as solved.
    At the top of the Thread under Thread Tools.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-15-2011, 09:23 PM
  2. Replies: 1
    Last Post: 11-04-2011, 06:53 AM
  3. Making subforms editable
    By ashiers in forum Forms
    Replies: 7
    Last Post: 10-08-2008, 04:09 PM
  4. making specific fields non-editable
    By narayanis in forum Forms
    Replies: 3
    Last Post: 08-06-2008, 12:22 PM
  5. Making a new field in a query
    By mslieder in forum Queries
    Replies: 3
    Last Post: 05-14-2008, 11:44 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