Using VBA code to refresh links 
Author Message
 Using VBA code to refresh links

My database has some linked tables.  The data in these tables changes about
once a month.  When these changes occur, I always refresh the link and
re-run my queries.  Now in reading the help file on linked tables, I think I
understood that the data automatically refreshes when it's changed...but
just in case, I always refresh the data myself and manully run the queries.
I have three that need to be run in a sequential order.

I'm making a form and want to add a button that says "refresh data".  But I
don't know the VBA language to do this.  And our computer guys won't load
the VBA for applications help file on my computer.

Would someone be willing to help me with this?

I'm an intermediate access user, but have just started getting into macros
and know even less about vba.

Thanks
Laura Reid



Mon, 15 Mar 2004 21:46:05 GMT  
 Using VBA code to refresh links
Laura, you don't have to update the tables.  If they're
linked tables they will update automatically.  As for the
queries you can run the with the following code:

DoCmd.OpenQuery "name", acViewNormal, acReadOnly
DoCmd.Close acQuery, "name", acSaveNo

repeat three times for your three queries

Quote:
>-----Original Message-----
>My database has some linked tables.  The data in these

tables changes about
Quote:
>once a month.  When these changes occur, I always refresh
the link and
>re-run my queries.  Now in reading the help file on

linked tables, I think I
Quote:
>understood that the data automatically refreshes when
it's changed...but
>just in case, I always refresh the data myself and

manully run the queries.
Quote:
>I have three that need to be run in a sequential order.

>I'm making a form and want to add a button that

says "refresh data".  But I
Quote:
>don't know the VBA language to do this.  And our computer
guys won't load
>the VBA for applications help file on my computer.

>Would someone be willing to help me with this?

>I'm an intermediate access user, but have just started
getting into macros
>and know even less about vba.

>Thanks
>Laura Reid

>.



Mon, 15 Mar 2004 22:07:45 GMT  
 Using VBA code to refresh links
Hi Laura,

The following article may be helpful to you, assuming you have some
knowledge of VBA

Q209862 ACC2000: How to Relink Tables with the Common Dialog Control
http://support.microsoft.com/support/kb/articles/q209/8/62.asp

I hope this is helpful in getting you started

Thank you for Using Microsoft Developer Support,

Jeff MacLeod, MCP
Microsoft Developers Support

This posting is provided AS IS with no warranties, and confers no rights.
You assume all risk for your use.
? 2001 Microsoft Corporation. All rights reserved.



Fri, 19 Mar 2004 01:58:06 GMT  
 Using VBA code to refresh links
Thanks everyone.
I really do appreciate the help.

Laura


Quote:
> My database has some linked tables.  The data in these tables changes
about
> once a month.  When these changes occur, I always refresh the link and
> re-run my queries.  Now in reading the help file on linked tables, I think
I
> understood that the data automatically refreshes when it's changed...but
> just in case, I always refresh the data myself and manully run the
queries.
> I have three that need to be run in a sequential order.

> I'm making a form and want to add a button that says "refresh data".  But
I
> don't know the VBA language to do this.  And our computer guys won't load
> the VBA for applications help file on my computer.

> Would someone be willing to help me with this?

> I'm an intermediate access user, but have just started getting into macros
> and know even less about vba.

> Thanks
> Laura Reid



Fri, 19 Mar 2004 22:29:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Linked table in Access 97 using VBA code ????

2. Refreshing Text Link in VB & VBA

3. refresh link in code or other method

4. Refreshing Link to Excel97 Spreadsheet with Code

5. Can I use VBA code to refresh library references

6. Breaking Links in VBA code

7. Link to another database using vba

8. Linking Tables in Password protected databases using VBA

9. LINKING TABLES using VBA

10. ODBC link in VBA using variable name

11. how to link a picture object into a recordfield using VBA

12. How to link a bitmap to a reordfield using VBA

 

 
Powered by phpBB® Forum Software