Query Property: Source Database

  • Thread starter Thread starter johnb
  • Start date Start date
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
 
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
 
Back
Top