Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    29

    Unanswered: Default Value + Locked Field

    I set 0 as the default value in a form's field, but it doesn't show. The same field remains locked even when is set not to. And if I insert another field, right of the bat it starts locked.

    Any ideas please?

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    A field is only set to the default value when you are creating a new record and not specifying the value for that field. Put another way, if you are simply editting a record the default value is not set. Or if you are adding a new record, but you tell it to store a 1 in the field, then the default is not used.

    As far as the lcoking goes, is it in a form? If so, the form has properties to lock all the fields on the form. Check the Allow Edits property of the form. You can also set these in VB when you are opening a form.

  3. #3
    Join Date
    Apr 2004
    Posts
    29
    Originally posted by DCKunkle
    A field is only set to the default value when you are creating a new record and not specifying the value for that field. Put another way, if you are simply editting a record the default value is not set. Or if you are adding a new record, but you tell it to store a 1 in the field, then the default is not used.
    Gotcha, it happens when creating a new record.

    Originally posted by DCKunkle
    As far as the lcoking goes, is it in a form? If so, the form has properties to lock all the fields on the form. Check the Allow Edits property of the form. You can also set these in VB when you are opening a form.
    'Allow Edits' is set to 'Yes', and 'Record Locks' is set to 'No Locks', though it was 'All Records' but I changed it, same results.

    Thank you!

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    How is the form opened? From the database window? Do you click a button from another form?

    Are you adding the record on a form? Where are you checking the Default value? The table can have a default value but so can a control on a form.

  5. #5
    Join Date
    Apr 2004
    Posts
    29
    Originally posted by DCKunkle
    How is the form opened? From the database window? Do you click a button from another form?
    By double clicking on the form's name.

    Originally posted by DCKunkle
    Are you adding the record on a form? Where are you checking the Default value? The table can have a default value but so can a control on a form.
    I'm adding a new record to the form.

    I'm checking the default value on the form. The field's 'Control Source' is not linked to a table, but instead is a simple, straight forward formula.

    Thank you!

Posting Permissions

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