How to refresh the imported data from XML data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I imported the XML data from our web service into an access database (access
2003). I did not found the build-in refresh function like the one in Excel.
So I created a form to show all data and a button in the form to refresh the
data (load from the web service). As I'm new to VBA, is there any sample code
to do this or the code for importing XML data?

Thanks in advance.

Yolande
 
Hi Chris,

Thank you very much. But I don't know where to add the button. In a form or
in toolbars? I want to refresh the data in tables but not the form.

Thanks.

Yolande
 
Yolande,

Are you importing the data directly into the tables? If so
the tables should reflect the new data. If the table is
open you may need to close the table and reopen. Forms
that you view the tables needs to be refreshed.
How/where are you importing the data to?


Chris
 
Hi Chris,

I import the XML data from a web service into tables. As the data change
everyday, I would like my tables update data everytime when I open the
database, or after I open the database, there is a button that can do this.

Moreover, I have a form that views the important fields of these tables. I
want a button to refresh the data to the updated data in the table. As I
don't know much about VBA and Access programming (I'm learning), please help
me.

Thank you very much.

Yolande
 
I'm not sure whether you mean you want the form to show the latest data that
is already in the table, or that you want to import the latest data from the
web service when you open the form?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Hi,

I want both. First, import the latest data from the web service when I open
the form (or database so that the tables contain the latest data). Second,
the form shows the latest data that is already in the table.

If I can import the data from the webservice directly to a form and the form
can update the data by one simple click, that better. What I really want to
do is that when a user open a database, he can view the updated data from the
webservice by on click.

Thanks a lot.

Yolande
 
Whatever code you're using to get the data into the table, you need to call
that code from the Open event of the form, then call the Requery method of
the form. There isn't any event that is fired when a user opens a database,
but you can set a form to be the Startup object that gets opened
automatically when the user opens the database. With the database window
selected, choose Startup from the Tools menu, then select your form from the
list labelled 'Display Form/Page'.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top