Locking specific data in a continous form


Chad Cameron

Hi All,

Is there a way to lock one field in a continous form, but still allow the
user to enter new data? Basically I need to disable the ability to edit the
field. I heard about an 'allow edit' command but I cannot find it. Is it
available in Access2000?

In my continuous form I have a combobox and a textbox. Once the uses
selects the item in the combobox and enters a date in the textbox, I want to
lock the combobox. The next time the user opens the form, I want him/her to
be able to change the date in the textbox of any of the prior entries and
also be able to enter a new item in the next combobox, but not be able to
change the prior comboboxes.




Damon Heron

In the current event of the form, add this code:

If Me.NewRecord Then
Me.{name of your combobox}.Locked = False
Me.{name of your combobox}.Locked = True
End If

This unlocks the combo for new records only.



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