Data Entry Form - Open Table Button - Current Record Not on Table (1 Viewer)

razorking

Registered User.
Local time
Today, 12:15
Joined
Aug 27, 2004
Messages
332
This is small conundrum but nevertheless kind of interesting.

I made a form that is based upon a table. The form is just for entering data one record at a time. On this form I placed a button that opens the source table, for viewing in the more concise table view. I have noticed that if you are entering a new record on the form, and you click the button to open the table, the table does not show the record that is being entered on the form - even if all of the fields have data entered on them. Would I expect the user to click Next/New record each time before opening the table? Or is there some other common way to deal with this?
 

Isaac

Lifelong Learner
Local time
Today, 12:15
Joined
Mar 14, 2017
Messages
8,777
Or is there some other common way to deal with this
My opinion: No, because it is not common to open a table directly for a user. You should never do that.

To give users a nicer or more concise interface to enter records, you should design that for them using the interface tools Access provides - Forms (of many types), etc.
 

razorking

Registered User.
Local time
Today, 12:15
Joined
Aug 27, 2004
Messages
332
My opinion: No, because it is not common to open a table directly for a user. You should never do that.

To give users a nicer or more concise interface to enter records, you should design that for them using the interface tools Access provides - Forms (of many types), etc.
I do understand that. This is however a very basic application. One table and one form. I can certainly create a form that opens, instead of the table. Just don't know if I am going to have the same issue. Will give it a try.
 

Isaac

Lifelong Learner
Local time
Today, 12:15
Joined
Mar 14, 2017
Messages
8,777
There are a handful of triggers that cause Access to automatically save a record - without asking. Closing a form, navigating to a different record, closing the database, switching forms, etc.

In your case, at the time you open the table, Access simply hasn't encountered one of those triggers yet - so the record doesn't exist / get reflected in the table.

You could add a button to your form to force a save. Once they press that, then, if it works correctly, opening the table would show the new record.
 

missinglinq

AWF VIP
Local time
Today, 15:15
Joined
Jun 20, 2003
Messages
6,423
Or better yet, in the same button you use to open the Table, prior to the code that does that, use

If Me.Dirty Then Me.Dirty = False

But as has been said...you really should replace the Table with a simple Form, such as a Datasheet View Form, that looks just like a Table.

Linq ;0)>
 

razorking

Registered User.
Local time
Today, 12:15
Joined
Aug 27, 2004
Messages
332
There are a handful of triggers that cause Access to automatically save a record - without asking. Closing a form, navigating to a different record, closing the database, switching forms, etc.

In your case, at the time you open the table, Access simply hasn't encountered one of those triggers yet - so the record doesn't exist / get reflected in the table.

You could add a button to your form to force a save. Once they press that, then, if it works correctly, opening the table would show the new record.
Yes. I think that works/ Preliminary results look good anyway. Thanks!
 

razorking

Registered User.
Local time
Today, 12:15
Joined
Aug 27, 2004
Messages
332
Or better yet, in the same button you use to open the Table, prior to the code that does that, use

If Me.Dirty Then Me.Dirty = False

But as has been said...you really should replace the Table with a simple Form, such as a Datasheet View Form, that looks just like a Table.

Linq ;0)>
Roger that.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:15
Joined
Feb 19, 2002
Messages
43,274
Opening a naked table is so dangerous that I'm going to agree with the others. Create a continuous view or DS view form and open that. Make sure to make the form NOT UPDATEABLE. You don't want to duplicate validation rules in multiple places. That will be hard for you to manage and impossible for your successor since it will be unexpected. Safest is to just not allow add/change/delete in your list view form.
 

Users who are viewing this thread

Top Bottom