Open read-only form blank

  • Thread starter Thread starter Mishanya
  • Start date Start date
M

Mishanya

I've been reading a lot of threads on the issue, but still have no solution.
I want the form to open blank so the user can search records with unbound
cboSelectors in the Header, but it won't allow to change or add records, so
the "blank" record can't be "new" record.

Using On Open event procedure:
Me.Filter = "(False)"
Me.FilterOn = True

opens the form on "new" record in Add-one-record-only mode and disables the
cboSelectors.

Using the Load event procedure:
If Not Me.NewRecord Then
RunCommand acCmdRecordsGoToNew
End If

lets the cboSelectorswork, but opens the form on "new record in Add-enabled
mode.

Playing with AllowAdditions, AllowDeletions, AllowEdits and DataEntry
properties has not let me any further. I still can't find "Read only - open
blank (not on new record) - search with cboSelectors" mode.

I'll appreciate any help.
 
Hi Mishanya,
there is a sample search form that does that on this site:
http://allenbrowne.com/ser-62.html

It is set up to show all records when it opens, but the code has a
commented out section to use if you want it to open blank.
It also explains why the search form needs to have its Allow Additions set
to true, and how to stop users from adding new records.
Well worth a look.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Back
Top