Form gets stuck in Data Entry mode

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

Guest

We have a form in a database for viewing records.
If Records -Data Entry is clicked, we get a blank form to enter data, and
the record count shows 1 of 1.
However it seems impossible to get back to the normal view. If the form is
closed and re-opened the blank form is presented, if database closed, still
stuck in this mode.
Only way out is to click Records - Remove Filter/Sort, when records are
again displayed normally.
BUT if the form is closed and re-opened, it is again blank!!!
Help please.
 
LeighB said:
We have a form in a database for viewing records.
If Records -Data Entry is clicked, we get a blank form to enter data,
and the record count shows 1 of 1.
However it seems impossible to get back to the normal view. If the
form is closed and re-opened the blank form is presented, if database
closed, still stuck in this mode.
Only way out is to click Records - Remove Filter/Sort, when records
are again displayed normally.
BUT if the form is closed and re-opened, it is again blank!!!
Help please.

That is not a setting that would normally be saved unless you set it while in
design mode. Are you opening it by double-clicking in the db window or from a
button? When using code from a button there is an argument in the OpenForm
method that determines the data mode. That will override the setting saved with
the form.
 
Rick Brandt said:
That is not a setting that would normally be saved unless you set it while in
design mode. Are you opening it by double-clicking in the db window or from a
button? When using code from a button there is an argument in the OpenForm
method that determines the data mode. That will override the setting saved with
the form.
Hi Rick,
Thanks for reply. Yes the form is opened with a button on another form, I
will check the properties on that button and see if it can be sorted
Leigh
 
LeighB said:
Hi Rick,
Thanks for reply. Yes the form is opened with a button on another form, I
will check the properties on that button and see if it can be sorted
Leigh
I have looked at the Button properties, and it runs a subroutine.
The OnClick
Routine is as follows

Private Sub Add__Delete_or_Edit_Member_s_Details_Click()
On Error GoTo Err_Add__Delete_or_Edit_Member_s_Details_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Member Details"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Add__Delete_or_Edit_Member_s_Detail:
Exit Sub

Err_Add__Delete_or_Edit_Member_s_Details_Click:
MsgBox Err.Description
Resume Exit_Add__Delete_or_Edit_Member_s_Detail

End Sub

There is a different subroutine for each of the buttons on the form.

Is there anything obviously wrong with this?

We bought the database some years ago from another Club and it was modified
slightly for our use.

Hope you can point to a solution.
Regards
Leigh
 
LeighB said:
I have looked at the Button properties, and it runs a subroutine.
The OnClick
Routine is as follows

Private Sub Add__Delete_or_Edit_Member_s_Details_Click()
On Error GoTo Err_Add__Delete_or_Edit_Member_s_Details_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Member Details"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Hmm, normally the next argument (after stLinkCriteria) would be the one that
would override the default setting for the form. To coerce the form into
DataEntry mode I would have expected to see...

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd

What is the DataEntry property of the form in question? If you don't want a
blank form upon opening that property should be set to No.
 
Rick Brandt said:
Hmm, normally the next argument (after stLinkCriteria) would be the one that
would override the default setting for the form. To coerce the form into
DataEntry mode I would have expected to see...

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd

What is the DataEntry property of the form in question? If you don't want a
blank form upon opening that property should be set to No.
Hi Rick,
The DataEntry property of the form is set to No,

On my copy of the database at home, I have found a work around, if I click
Records Data Entry I get the blank form behaviour I described in my OP.
However when I have the blank form I click Records Remove filter/sort, then
Records Apply Filter/sort
It does seem to reset the database back to normal behaviour.
I will try that at the Club tomorrow to see if that is a permanent fix
 
Hi Rick,
Just to let you know that the routine I described worked on the office copy,
so we are back to normal working!
Thanks for you help
Leigh
 
Back
Top