Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Refreshing a Continuous Form without Requerying

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JeffBuzz - 02 Apr 2008 21:50 GMT
Hello All,
Is it possible to Refresh a Continuous Form without Requerying the
entire data set?

Here is what I am trying to do, I have a form that displays records in
a Continuous form. The data source is an existing query that joins a
few different tables. It takes a while to run (20 seconds or so)
because one of the tables has a lot of records in it.

The form allows the user to double click one of the rows and opens a
new form where the user can edit a few of the fields. The fields in
the seconds form are not bound to anything. I am manually updating a
table using SQL and the values of the form fields. The table that gets
updated is NOT the large table from the original query.

After the user closes the second form, I would like to REFRESH the
continous form to see the changes I just made to the current selected
record. I do not want to Requery because that will run the whole query
over and it takes too long to run (although it does have the desired
effect). Is there anyway to just update the current form fields with
the changes I just made? Isn't that what the Form.Refresh method is
for?

Is Form.Refresh not working because my original data source is a query
and thus not updatable? Any other ideas? Thanks for your help.

Jeff
Klatuu - 02 Apr 2008 22:44 GMT
No, the Refresh updates the underlying table, but does not requery the
database, so you will have to use the requery to see your additions.
Signature

Dave Hargis, Microsoft Access MVP

> Hello All,
> Is it possible to Refresh a Continuous Form without Requerying the
[quoted text clipped - 23 lines]
>
> Jeff
JeffBuzz - 03 Apr 2008 01:04 GMT
What do you mean by "updates the underlying table"? I have already
updated the underlying table myself on another form. Now I want the
first form (the continuous form) to update to show these changes. From
what you said, it sounds like I need to requery. I would like to avoid
that if possible because the query takes a while.

Is it possible to manually update the controls on the continuous form?
For example, if there are two textboxes for each record, can I just
manually set the values? That will probably change the values for all
the rows of the continuous form, won't it?

Is this possible at all?
Klatuu - 03 Apr 2008 14:26 GMT
I was not referring to what you are doing.  I was only describing what the
Refresh method does.   As I said before, the only way to get newly added
records into your forms recordset is with a requery.
Signature

Dave Hargis, Microsoft Access MVP

> What do you mean by "updates the underlying table"? I have already
> updated the underlying table myself on another form. Now I want the
[quoted text clipped - 8 lines]
>
> Is this possible at all?
JeffBuzz - 03 Apr 2008 16:20 GMT
HI Dave,
Actually, I am not adding new records. I am just updating....oh
wait....my original query is a left join between two tables. For some
records in the continuous form, all fields are populated (data exists
in both joined tables). In other records, only some of the fields are
populated (data exists only in the left table). Users can edit these
values, which will actually add a record to the joined table. So the
total number of records on the original query stays the same, but
there are new records being added to the joined table.

I am suspecting this is my problem. Is my only solution to requery? I
wish I could just somehow refresh the one table.
Klatuu - 03 Apr 2008 16:31 GMT
Okay, JeffBuzz.  I see what you are doing, but unfortunately, there is no
going around a requery.

The problem is that only the data entered into the form will exist in the
form's recordset.  When you add data outside the form, it doesn't know about
it.  The only way for the form to know about the data added to the table is
with a requery.
Signature

Dave Hargis, Microsoft Access MVP

> HI Dave,
> Actually, I am not adding new records. I am just updating....oh
[quoted text clipped - 8 lines]
> I am suspecting this is my problem. Is my only solution to requery? I
> wish I could just somehow refresh the one table.
JeffBuzz - 03 Apr 2008 16:43 GMT
Thanks for your help Dave. Looking throught the documentation, it
would appear that the "Unique Table" property is what would help solve
my problem. Unfortunately, I can seem to get that to work.
Klatuu - 03 Apr 2008 16:53 GMT
The Unique Table property only applies to adp files (an Access Project), not
to MDB files.
I sympathize with your frustration, but you are wasting your time trying to
get around this. If your form has an uneditable recordset and you add or
modify data in any of the underlying tables, the only way to get the modified
data into the form's recordset is with a Requery.
Signature

Dave Hargis, Microsoft Access MVP

> Thanks for your help Dave. Looking throught the documentation, it
> would appear that the "Unique Table" property is what would help solve
> my problem. Unfortunately, I can seem to get that to work.
JeffBuzz - 03 Apr 2008 16:57 GMT
So it seems. Thanks again for your help (and your patience) :-)
Klatuu - 03 Apr 2008 17:02 GMT
Wish I could give you the answer you want.
The only other thing you may consider is reforming your query so it executes
more quickly, but that may not be an option.
Signature

Dave Hargis, Microsoft Access MVP

> So it seems. Thanks again for your help (and your patience) :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.