Query Property: Source Database

J

johnb

Hi All
In Access 2003 I'm using the query property "Source Database" to link
several queries to an external db. But is it possible to call a function from
this property where the db path and name held as string?

TIA
johnb
 
T

Tom van Stiphout

On Tue, 12 May 2009 02:03:01 -0700, johnb

Sure. The help page on that property says it can take a string
expression. So I can set it to GetSourceDatabase()

Then in a standard module I can write:
Public Function GetSourceDatabase()
GetSourceDatabase = "c:\test.mdb"
End Function

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top