PDA

View Full Version : link to web-accessible database?



eed
01-31-2006, 02:34 PM
Hi, all,

We have one Access database on the my building's server, to which I am directly connected. We have another Access database on a different server, to which I am not directly connected, but the database is publicly accessible via the web. [Both files are in Access 2003.]

If I know the relevant table and field names, is there any way I can use the web-accessible database's URL in order to query and/or link information out of the web-accessible database into our local database?

Suggestions appreciated! Thanks! http://vbaexpress.com/forum/images/smilies/bouncy.gif

~ eed

mdmackillop
01-31-2006, 02:51 PM
Here's some code I use to get KB info. Maybe you can adapt it.

Sub gethtmltable()
Dim objWeb As QueryTable

With Sheets(1)
.Range("A:C").ClearContents
Set objWeb = .QueryTables.Add( _
Connection:="URL;http://www.vbaexpress.com/kb/kblist.php", _
Destination:=.Range("A1"))
With objWeb

.WebSelectionType = xlSpecifiedTables
.WebTables = "12" ' Identify your HTML Table here
.Refresh BackgroundQuery:=False
.SaveData = True
End With
.Range("B1").ColumnWidth = 30
.Range("C1").ColumnWidth = 40
.Columns("B").Font.ColorIndex = 5
.Columns("B").Font.Underline = xlUnderlineStyleSingle
End With
End Sub

eed
02-02-2006, 07:19 AM
Hi, mdmackillop,

Are you using this code to pull the data into an Excel worksheet? Just trying to understand the context here as I try to adapt it...

Thanks!
~ eed

mdmackillop
02-02-2006, 08:58 AM
Yes, that's what I do with it.