Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    England
    Posts
    26

    Unanswered: Only allow entry to field in new records

    Is there any way I can set a field (on a form) so that the only time you can enter data is when it is a new record?

    When it is not a new record I would want it not to be available for update.

    Thanks
    Beth

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    233
    You can lock all fields on your for on form load.

    When the user clicks on Add Record you then unlock the fields

    ie fieldname.Locked = True

    when the user clicks Add Record unlock the field

    ie fieldname.Locked = True

    Besure to lock the field after itherwise it will remain open so anyone could enter or wipe data in error

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    In the forms OnCurrent event, do this:

    If Me.Newrecord then
    field1name.Locked=False
    field2name.Locked=False
    ...
    Else
    field1name.Locked=True
    field2name.Locked=true
    ...
    End if

    That way, your always sure that the fields are locked unless it's a new record.
    Inspiration Through Fermentation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •