Solved

saving current form, refreshing and staying on the record you are viewing on the different forms?

Posted on 2012-03-12
7
395 Views
Last Modified: 2012-06-27
When my users work, they have multiple forms opened.

I asked them to hit the refresh all to save the current working record.
So this data can be propagated to other forms' lookup controls like combo box.

When they hit the refresh all, the current record from whatever opened forms got sorted and lost.

1) How can I save the current record on the working form without losing the location of the whatever forms they have opened?

2) When I add/edit on one form, I want that to propagated to other currently opened forms without losing their current location?
0
Comment
Question by:dkim18
  • 4
  • 2
7 Comments
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 150 total points
ID: 37710517
I don't think there's much you can do if you continue to use the Refresh button on the ribbon.  You have no means of getting inside that process.
(The problem is due to the fact that Refresh is not really refresh - it performs a Requery, not a Refresh.).

To get control over the situation you have to build your own Refresh procedure and if you want it to be always available then you will have to build your own custom ribbon to trigger it as well - unless you have a form that is always open and where you could place a Refresh All button.
0
 

Author Comment

by:dkim18
ID: 37710577
I think this only happens when you are creating a new record.

To propagate the data you just created from one form to other forms, I use the refresh all, is that right?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37710869
<I use the refresh all, is that right?>
Well, if you tried it, did it work?

<the current record from whatever opened forms got sorted and lost.>
I have never "Lost" data by hitting the refresh all button.

As Pete states, this does a requery (that will bring you back to the first record typically), thus you will not be on the current record anymore.
But the record is not "Lost"

This is the reason most Access devs try to keep the number of open forms to a minimum.

Try to use Main/subforms instaed of standalone forms, where managing these things is easier
.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:dkim18
ID: 37710990
Yes, the refresh all works.
I meant "Lost" as the newly created record got sorted and it is not the current working record.

I am already using the main/subform.


So what do you guys suggest for staying at the newly added record after the creating new record?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37711242
Something like this:
Database93.mdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37711251
And keep the "Multiple forms open at a the same time" stuff down to a *minimum* and simply avoid these issues altogether...
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 350 total points
ID: 37711264
My pointy here is that if you used a Main subform this would not be an issue...
(simply enter the child data into the subform)

As soon as you want to allow: "Multiple forms open at a the same time"

Then managing this can get complex and messy relatively quickly...

JeffCoachman
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question