As I see it, SELECT CASE is something you use when you have multiple possible scenarios. In your case, from you have told us thus far, you have 2 options. Read only, and Not Read Only. Thats why I see little sense in using a SELECT CASE.
Regarding your pseudo code:
- select case "when form is in add mode"
There is also no "simply" identifier as to when a form is in read only mode, or add mode. To some extent it depends on your definitions. For example, to some people Read Only means they cannot edit old records but they can add new ones, while to others it means they cannot do anything but read.
True read only (the second case I described) would be:
- Me.AllowAdditions=false
-
Me.AllowEdits=false
-
Me.AllowDeletions=false
Personally I have for each of my forms a LockForm procedure which takes a single boolean argument,to either lock/unlock the form. This procedure gets called in the forms load event, and the forms current event, as well as the forms afterUpdate event. (and on click of the edit button).