Button to show all records on "Data Entry Form" (2 Viewers)

moi

Member
Local time
Tomorrow, 03:27
Joined
Jan 10, 2024
Messages
230
The OP seems to be confused between what is an ACCESS executable command and what is a defined control name on a form. I think they wanted to somehow execute a control name.

A form in edit mode is still capapble of data entry using the button on the bottom of the form. You could also use your own button.
Data Entry property means you can only ever add records. The most misnamed property in Access. :(
View attachment 113898
Thanks.. I knew it, i will learn it here..
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:27
Joined
Feb 19, 2013
Messages
16,633
Data Entry property means you can only ever add records.
Not quite true- you could add a record, add some more then edit an earlier just added record before closing the form. I think filtering or sorting will also clear the form
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:27
Joined
Sep 21, 2011
Messages
14,361
Not quite true- you could add a record, add some more then edit an earlier just added record before closing the form. I think filtering or sorting will also clear the form
Hmm, never realised that, though TBH never use that either.
Just tried it out, (I like to confirm for myself as well :) ) and can see that records added in that session can be amended. :(

Thank you @CJ_London that could help me help others in the future. (y)
 
  • Like
Reactions: moi

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:27
Joined
Feb 19, 2002
Messages
43,365
It took us a long time to get to the fact that the form is set to "Data Entry".

Is the problem now resolved? When you open a form whose DataEntry property is set to Yes, you get to enter new records and the only other records you can view/change are the records you added since you opened the form.

docmd.OpenForm "xxx",acNormal,,,acFormAdd ---- opens the form in DataEntry mode
docmd.OpenForm "xxx",acNormal,,,acFormEdit ---- opens the form showing the bound data and allows records to be edited or added
 

moi

Member
Local time
Tomorrow, 03:27
Joined
Jan 10, 2024
Messages
230
Not quite true- you could add a record, add some more then edit an earlier just added record before closing the form. I think filtering or sorting will also clear the form
Hi.. yes you can browse the newly add records, what i mean is the older records..
 

moi

Member
Local time
Tomorrow, 03:27
Joined
Jan 10, 2024
Messages
230
Hmm, never realised that, though TBH never use that either.
Just tried it out, (I like to confirm for myself as well :) ) and can see that records added in that session can be amended. :(

Thank you @CJ_London that could help me help others in the future. (y)
Hi Gasman,

Yes, as you said, "in that session", but what i wanted is to browse older records along with the newly enter.. maybe you have some ways to display "all records" from a "data entry" form, pls share as my knowledge as beginner is very limited..

Thank you.
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:27
Joined
Sep 21, 2011
Messages
14,361
Hi Gasman,

Yes, as you said, "in that session", but what i wanted is to browse older records along with the newly enter.. maybe you have some ways to display "all records" from a "data entry" form, pls share as my knowledge as beginner is very limited..

Thank you.
I always just used an Edit form and that button on the navigation bar. You could use a button of your own to toggle between Data Entry on or off?
TBH I have never ever used Data Entry = Yes, never had a separate form for adding records and another for editing.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:27
Joined
Feb 19, 2002
Messages
43,365
Yes, as you said, "in that session", but what i wanted is to browse older records along with the newly enter.. maybe you have some ways to display "all records" from a "data entry" form, pls share as my knowledge as beginner is very limited..
I refer you back to #24. Instead of setting the property of the form permanently to DataEntry = True, open the form in whichever view you want using the code I included.

You might be able to change the DataEntry property on the fly. I don't know because I would never do that but give it a go and see if that solves your problem.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 20:27
Joined
Sep 12, 2006
Messages
15,661
DoCmd.ShowAllRecords
It probably fails to work as you would like because of the behaviour of a data entry firm. A Data entry form just allows you to enter new records in this session, and not see pre existing records, so I expect showallrecords just shows the new ones in the current session. .
 

moi

Member
Local time
Tomorrow, 03:27
Joined
Jan 10, 2024
Messages
230
It probably fails to work as you would like because of the behaviour of a data entry firm. A Data entry form just allows you to enter new records in this session, and not see pre existing records, so I expect showallrecords just shows the new ones in the current session. .
Hi,
So between "ShowAllRecords" vs "DataEntry"=False which one is recommendable to use?.

Thank you.
 

GPGeorge

George Hepworth
Local time
Today, 12:27
Joined
Nov 25, 2004
Messages
1,917
Hi,
So between "ShowAllRecords" vs "DataEntry"=False which one is recommendable to use?.

Thank you.
For what purpose?

  • If you want to see ALL records in the form's bound recordsource, both previously existing and newly added during the current session, you can do that by setting DataEntry to False.
A second factor is whether or not an additional filter is applied to the form's recordsource.
  • If you want to apply a filter to a form's recordsource, but then remove that filter:

    "Use the ShowAllRecords action to remove any applied filter from the active table, query result set, or form, and display all records in the table or result set or all records in the form's underlying table or query."
https://learn.microsoft.com/en-us/office/vba/api/access.docmd.showallrecords
 
  • Like
Reactions: moi

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:27
Joined
Feb 19, 2002
Messages
43,365
So between "ShowAllRecords" vs "DataEntry"=False which one is recommendable to use?.
Again I refer you back to #24. You can open the form in the mode you want to work with.

If you want to toggle the view, then you need to set the DataEntry property to yes or no as desired. I wouldn't even consider the ShowAllRecords option which I doubt will work anyway if the DataEntry property is set to yes since the two properties are in conflict.
 
  • Like
Reactions: moi

Gasman

Enthusiastic Amateur
Local time
Today, 20:27
Joined
Sep 21, 2011
Messages
14,361
If you insist on doing it your way, then use a button to toggle data entry off and on, and change button caption accordingly.
 
  • Like
Reactions: moi

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 20:27
Joined
Sep 12, 2006
Messages
15,661
Hi,
So between "ShowAllRecords" vs "DataEntry"=False which one is recommendable to use?.

Thank you.
If you want a data entry form, where you have clerks entering batches of new records, with no need to see records that have already been entered, then you want a data entry form..

If you are entering stock taking records it may be convenient to use data entry mode.

If you want to review all existing records then you don't want a data entry form

I have never used "show all records" and I'm not sure exactly what it does. I've never had occasion to switch a form from Data entry = true to data entry = false. You may need to requery the firm after changing the setting.
 
  • Like
Reactions: moi

moi

Member
Local time
Tomorrow, 03:27
Joined
Jan 10, 2024
Messages
230
If you want a data entry form, where you have clerks entering batches of new records, with no need to see records that have already been entered, then you want a data entry form..

If you are entering stock taking records it may be convenient to use data entry mode.

If you want to review all existing records then you don't want a data entry form

I have never used "show all records" and I'm not sure exactly what it does. I've never had occasion to switch a form from Data entry = true to data entry = false. You may need to requery the firm after changing the setting.
Hi, yes i used Data Entry = False.. thank you..
 

Users who are viewing this thread

Top Bottom