473,388 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Screen Refresh Issue in A2002

I have a situation where I am using an unbound dialog form to update data in
an Access 2002 split back end / front end scenario. The data update is done
via an ADO call (direct to the back end db) when the user clicks the save
button. The dialog then closes and the user should be able to see the
result of their edit in a list view that now has focus. This is where I run
into a problem. The list view wont refresh to pick up the data changes.
This seems to be a timing issue with the ODBC linked tables because not even
the following drastic solution works. Any ideas?

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.RecordSource = "" 'set
recordsource to null
Forms!frmoraltt!frmAllocations.Form.RecordSource =
"qryoralallocations" 'reset to what we want it be - and effect a refresh
of the data records.
Nov 13 '05 #1
5 2472
"Andrew Chanter" <he****@radsolutions.com.au> wrote
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end db) when the user clicks the save
button. The dialog then closes and the user should be able to see the
result of their edit in a list view that now has focus. This is where I run into a problem. The list view wont refresh to pick up the data changes.
This seems to be a timing issue with the ODBC linked tables because not even the following drastic solution works. Any ideas?

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.RecordSource = "" 'set
recordsource to null
Forms!frmoraltt!frmAllocations.Form.RecordSource =
"qryoralallocations" 'reset to what we want it be - and effect a refresh of the data records.


You have two separate issues - the recordsource of the form, and the
rowsource of the listbox. While your code above may refresh the form, it
does not requery the listbox. Use:

lst.Requery

Also, to refresh the Form, use one of the following (in order):

Me.Refresh
Me.Requery (should be sufficient)
Me.Recalc (usually not needed)

Just for educational purposes, you might want to read up on these, along
with Me.Repaint.
Darryl Kerkeslager

Nov 13 '05 #2
Thanks Darryl, but we're obviously not on the same wavelength here. I tried
..Refresh and .Requery before resorting to the more drastic approach I
copied to my posting. None of these work. I am quite confident that the
issue is technical rather than educational.
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:qo********************@comcast.com...
"Andrew Chanter" <he****@radsolutions.com.au> wrote
I have a situation where I am using an unbound dialog form to update data
in
an Access 2002 split back end / front end scenario. The data update is

done
via an ADO call (direct to the back end db) when the user clicks the

save button. The dialog then closes and the user should be able to see the
result of their edit in a list view that now has focus. This is where I

run
into a problem. The list view wont refresh to pick up the data changes.
This seems to be a timing issue with the ODBC linked tables because not

even
the following drastic solution works. Any ideas?

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.RecordSource = "" 'set recordsource to null
Forms!frmoraltt!frmAllocations.Form.RecordSource =
"qryoralallocations" 'reset to what we want it be - and effect a

refresh
of the data records.


You have two separate issues - the recordsource of the form, and the
rowsource of the listbox. While your code above may refresh the form, it
does not requery the listbox. Use:

lst.Requery

Also, to refresh the Form, use one of the following (in order):

Me.Refresh
Me.Requery (should be sufficient)
Me.Recalc (usually not needed)

Just for educational purposes, you might want to read up on these, along
with Me.Repaint.
Darryl Kerkeslager


Nov 13 '05 #3
But the code you have below does not show a requery of the listBox, only the
form.

Could you perhaps post the part where you requery the listbox too, with the
other code? Does the form reflect the update, and not the listbox, or do
both not reflect the update?
Darryl Kerkeslager
"Andrew Chanter" <he****@radsolutions.com.au> wrote
Thanks Darryl, but we're obviously not on the same wavelength here. I tried .Refresh and .Requery before resorting to the more drastic approach I
copied to my posting. None of these work. I am quite confident that the
issue is technical rather than educational.
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote
"Andrew Chanter" <he****@radsolutions.com.au> wrote
I have a situation where I am using an unbound dialog form to update data
in
an Access 2002 split back end / front end scenario. The data update is
done
via an ADO call (direct to the back end db) when the user clicks the save button. The dialog then closes and the user should be able to see the
result of their edit in a list view that now has focus. This is where
I run
into a problem. The list view wont refresh to pick up the data
changes. This seems to be a timing issue with the ODBC linked tables because

not even
the following drastic solution works. Any ideas?

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.RecordSource = "" 'set recordsource to null
Forms!frmoraltt!frmAllocations.Form.RecordSource =
"qryoralallocations" 'reset to what we want it be - and effect a

refresh
of the data records.


You have two separate issues - the recordsource of the form, and the
rowsource of the listbox. While your code above may refresh the form,

it does not requery the listbox. Use:

lst.Requery [snip] Darryl Kerkeslager

Nov 13 '05 #4
Darryl,

Thanks for your continued interest. There isnt a list box involved. I
probably didnt explain myself properly in my first post. By 'list view', I
meant a datasheet view showing a listing of the records. This view is
actually in a subform, so the code (using a standard approach) would look
like this:

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.Requery
Forms!frmoraltt!frmAllocations.Form.Refresh

Typically, strSQL will contain an INSERT statement to create a new record.
Therefore the new record should appear in the subform after the Requery and
Refresh. But it doesnt. I have played around with this for a couple of
hours this morning and tried things such as refreshing the link to the
tabledef object, using a For...Next loop to repeat the Requery and Refresh
actions numerous times, and including a Doevents but all to no avail. There
appears to be a fault with MS Access that is causing this behaviour. If you
are interested, I can email you a model of the issue so you can see for
yourself.


"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:Iq********************@comcast.com...
But the code you have below does not show a requery of the listBox, only the form.

Could you perhaps post the part where you requery the listbox too, with the other code? Does the form reflect the update, and not the listbox, or do
both not reflect the update?
Darryl Kerkeslager
"Andrew Chanter" <he****@radsolutions.com.au> wrote
Thanks Darryl, but we're obviously not on the same wavelength here. I tried
.Refresh and .Requery before resorting to the more drastic approach I
copied to my posting. None of these work. I am quite confident that the
issue is technical rather than educational.
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote
"Andrew Chanter" <he****@radsolutions.com.au> wrote
> I have a situation where I am using an unbound dialog form to update

data
in
> an Access 2002 split back end / front end scenario. The data update is done
> via an ADO call (direct to the back end db) when the user clicks the save
> button. The dialog then closes and the user should be able to see
the > result of their edit in a list view that now has focus. This is

where I run
> into a problem. The list view wont refresh to pick up the data changes. > This seems to be a timing issue with the ODBC linked tables because not even
> the following drastic solution works. Any ideas?
>
> Gcn.Execute strSQL
> Forms!frmoraltt!frmAllocations.Form.RecordSource = ""

'set
> recordsource to null
> Forms!frmoraltt!frmAllocations.Form.RecordSource =
> "qryoralallocations" 'reset to what we want it be - and effect a
refresh
> of the data records.

You have two separate issues - the recordsource of the form, and the
rowsource of the listbox. While your code above may refresh the form, it does not requery the listbox. Use:

lst.Requery [snip] Darryl Kerkeslager


Nov 13 '05 #5
"Andrew Chanter" <he****@radsolutions.com.au> wrote
Thanks for your continued interest. There isnt a list box involved. I
probably didnt explain myself properly in my first post. By 'list view', I meant a datasheet view showing a listing of the records. This view is
actually in a subform, so the code (using a standard approach) would look
like this:

Gcn.Execute strSQL
Forms!frmoraltt!frmAllocations.Form.Requery
Forms!frmoraltt!frmAllocations.Form.Refresh

Typically, strSQL will contain an INSERT statement to create a new record.
Therefore the new record should appear in the subform after the Requery and Refresh. But it doesnt. I have played around with this for a couple of
hours this morning and tried things such as refreshing the link to the
tabledef object, using a For...Next loop to repeat the Requery and Refresh actions numerous times, and including a Doevents but all to no avail. There appears to be a fault with MS Access that is causing this behaviour. If you are interested, I can email you a model of the issue so you can see for
yourself.


Does the record show up in the underlying table after the INSERT? Are there
fields that are calculated based on control values that may require
Forms("frmoraltt").frmAllocations.Form.Recalc?

You can email me a copy of the file and I will look at it, at the address in
the header (not spam-blacked in any way).
Darryl Kerkeslager
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Conax | last post by:
Hi there, My boss is hoping that I can come up with a page that displays some information. The information will always be displayed on specific part of the page, with auto refresh. But he...
0
by: jimvn | last post by:
while my screen saver (webshots) is active, my vb.net windows app updates a textbox. after exiting the password protected screen saver, the text box does not appear to be updated, but it has been,...
1
by: Paul Drabik | last post by:
I have an app written in A97. I also have sporatic users upgrading to A2002 as they get XP on the machines. So they need to open my A97 app. To do so, of course, I open the MDB exclusively to...
3
by: John Baker | last post by:
Hi: As in the "Wizard of Oz", I want people to "pay no attention to the man behind the curtain", by freezing the screen while a whole lot of things happen. I know about ECHO OFF, but this...
1
by: Rob Parker | last post by:
I posted this with a different subject line (in two posts - I added additional info in the second) in this newsgroup a few days ago, but haven't had a single response. Hopefully, that was because...
3
by: serge anton | last post by:
Hi, I want to refresh all the screen (including the desktop) or a part of the screen. I can have a reference to the screen with win32 API : public static extern int GetWindowDC(IntPtr...
0
by: Casey Bralla | last post by:
For some reason, I can't get curses to refresh the screen. Can someone offer a suggestion to try to debug this? Here is my python code snippet: stdscr=curses.initscr() curses.noecho()...
6
by: tombsy | last post by:
Hello Group. I work for a company who is about to embark on a long awaited Office upgrade from Office 97 to Office XP. Office XP comes with Access 2002. I am an accomplished Access developer...
23
by: alag20 | last post by:
Hi Guys, I have made an application which has a splash screen. This has one of the delegates to update a string which works fine. My issue is that I want to automatically refresh this splash...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.