MS Access application does not update unless you click?

I have developed a 37 meg. ms access 2013 application. THe problem is when I enter data into any of the forms I need to click around the application in order for the data to display on other related forms.

I know the application is poorly designed, but, I am into this project too deep to re-do the design.

What can I do to help or correct this problem?
cssc1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kelvin SparksCommented:
Generally, until you move off a record, the record is not saved. Until saved it is not available to any other form. And then, it will depend on how the other forms access the data as to when - for instance if you already had a continuous form bound the to table (or query) that the new record is to appear (and that form is open in another tab - or being used by another user), the new data may not appear until the form is refreshed.

You can add code to force that save sooner, and add refresh (or requery) functionaility to speed up that process elsewhere.


Kelvin
0
Nick67Commented:
You'll need a better understanding of how Access works.
Let's say you have a control on a form, txtMyStuff, with a ControlSource of tblStuff.MyField
In the table, there's a value --'Old'
Open the form, and txtMyStuff will show "Old" Great.

Now click in there and change 'old' to 'new'
The value of  txtMyStuff has not yet changed.
It's Value remains 'old'
It's .Text has become 'new'
When you leave the control txtMyStuff, only then does the .Value change.
Not before.
While you remain in the control, you can press ESC and revert the appearance of txtMyStuff to 'old' and not commit to any changes.

So that's the first issue (committing the changes to the tables)

The next issue is that on another form you have txtRefertoMyStuff.
It too is bound to a ControlSource of tblStuff.MyField
You open this form and txtRefertoMyStuff shows 'old'
On your first form, you change and commit txtMyStuff to 'new'
txtRefertoMyStuff will still show 'old' until it has to go back to the table to see what it's value is.

That's the second issue.
The second issue is easily dealt with.
Things you want to have happen after a value changes can be coded in a control's AfterUpdate event.

So, if you put
Private Sub txtMyStuff_AfterUpdate()
Forms!TheSecondForm!txtRefertoMyStuff .Requery
End Sub
in your code module then
txtRefertoMyStuff will get updated with the new value in txtMyStuff right after you change it.

Make sense?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
As Kevin and Nick have already said, your data isn't saved until either you force the save or Access recognizes that it should automatically save because you moved to another record or closed a form.  To force the record to save without moving to a new record or closing the form, add a save button.  In the Click event of the save button, save the record if it is dirty.
If Me.Dirty = True Then
    DoCmd.RunCommand acCmdSaveRecord
End If

Open in new window


Just because you saved the record, doesn't mean that any open forms/reports will "see" the change.  
When you open a report, Access creates a Snapshot in memory of the data that the report will show.  A Snapshot is just what it sounds like - the image of something at one point in time.  You wouldn't expect to look at a photo and have it change right before your eyes and a report won't either.
When you open a form, Access creates a Dynaset in memory of the data that the form will show.  A Dynaset is "live" but on a time delay.  Records in a Dynaset that change will eventually change as you are moving through the recordset.  Records that are deleted will show #Deleted# in all columns.  Records that are added, will not show at all until you rerun the query that created the Dynaset using the .Requery method.
Reports don't refresh at all.  Forms have a refresh interval that you can control.  I think the default is around one minute.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.