why can I still edit data when I set the "allowedits" property to

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 2000, I can't prevent editing of data without locking each
control individually. The form properties have no apparent control.

Also, how can I fill multiple fields from one table to another using a drop
down list box? Or what VB code format can be used to set control values in a
VB expression to set a First Name text box value to the First Name field
value in a lookup table when the drop down list box bound column is Last Name?
 
If there is an edit in progress when you set the form's AllowEdits property
to No, Access does not apply the property until the recrod is saved. That's
just as well, or you would be stuck with an unsaved edit.

Now, if you dirty the record programmatically, you are back at the place
where Access has to let the edit complete. If you do this in an event such
as the Current event of the form, or the AfterUpdate event of the form, the
form is *always* dirty, and so the AllowEdits never gets to take effect.

For your second question, you need a related table to hold the multiple
matching values. Then interface it with a subform, so you can enter multiple
choices, one per row, in the subform. It is not possible to choose multiple
values in a combo, and trying to use an unbound multi-select list box to
handle multiple related values is very messy: you mut program at least the
form's Current, BeforeUpdate, and Undo events. The subform works with no
programming required.
 
Back
Top