acFormReadOnly

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

I created a "DVD" form, which display the information
like: title, year, rating, etc.
On the top of this form I added a combo box and it sorted
by title. So when I select the specific title, the form
will display that DVD's information. Here is my
problem: I don't my friends open the "DVD" form and
update. I issued the command
DoCmd.OpenForm "DVD", , , , acFormReadOnly
It works great, but the combo box doesn't allow
selecting. How do I fix the combo box ?
Thank you.
 
I just wanted to propose another solution because I came across this thread when looking for a solution myself. Setting the locked property to 'true' may be a nuisance if your database has many screens of if you wanted to provide a read-only and an editable version of the same form. Instead, you can programatically change the recordset type (dynaset and snapshot). Setting a forms recordset type to snapshot opens the form as read-only but still allows the manipulation of unbound combo boxes.

Set the DataMode argument to blank, so that the form is no longer read-only. On the load method for the form, set the RecordsetType property:
Code:
 Forms![].RecordsetType = 3
Refer to help for the available enumerations. Optionally, you can pass a string to OpenForm's OpenArg's property if you wanted to set the record set type condintionally.
 
Back
Top