Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use a parameter to specify a database location? 1

Status
Not open for further replies.

TCARPENTER

Programmer
Mar 11, 2002
766
US
I have to perform some updates to a database for a database user out of the office, so I just want to send a small database with a query to append a few tables. I want my query to prompt the user for the location (the name of the database hasn't changed). I can't seem to figure this out. Here is what I have so far just as test:

Code:
PARAMETERS Location Text ( 255 );
SELECT *
FROM [Location] & DatabaseUpdates.mdb.TL_Report_Table INNER JOIN [Location] & DatabaseUpdates.mdb.TL_ReportOptions_Table ON TL_Report_Table.TL_Report_Recnum = TL_ReportOptions_Table.TL_Report_Recnum;

TIA
Todd
 
No.

You could use code to modify the SQL of a saved query.
Code:
CurrentDb.QueryDefs("qselMyQuery").SQL = "SELECT * FROM " & strLocation & "DatabseUpdates.MDB...."

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top