Locked field on form

  • Thread starter Thread starter Alex Martinez
  • Start date Start date
A

Alex Martinez

Hello,

In my text box I have locked my fields "Yes" and in my form on "open" the
fields are set to true, I have a command button (Add) I set the fields to
false. When the user press the add button. When the user goes to the next
record I set the fields "On Current" to true so the user doesn't erase the
data. My problem I seem to can't add a record even when I code the add
button to set the fields locked to false. What is going on. Any tips will
be appreciated. Thank you in advance.
 
check the following:

1. AllowAdditions property must be set to Yes.
2. RecordsetType property must be set to Dynaset.
3. if you're opening the form with an OpenForm action, make sure that the
DataMode argument is not set to ReadOnly.
4. if the form is bound to a query, the query must be updateable. to check
this, open the query from the database window (not through the form), and
see if you can add a record; if not, the query is not updateable.

btw, rather than setting the Locked property of all data controls in your
form to True/False, you might try setting the AllowEdits form property to
No. that will prevent existing records from being changed, but will not
prevent new records from being added. suggest you read up on the AllowEdits,
AllowAdditions, AllowDeletions, and DataEntry form properties in Access
Help, to better understand how you might use them to achieve the results you
want.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top