>Hi,
>
>I would like to distribute an application which I wrote to several clients. To do this I create a setup program with the MS-VB Application Setup Wizard. The problem with this is that the resulting application, installed on the clients site, which contains several DB Grids bound to a database(at design time), still looks for the database in the directory in which it was initially bound to. It obviously does not find it there and VB generates an error in return. How can I change my application so that it looks in the directory in which the user decides to install it to, instead of my directory (at home)?
>
>I am not a pro with VB, so any advice is appreciated.
>
>John
A few things in your question make me presume that you use DAO in VB5. You also use data control to bound your grid.
If these premonitions are good, change the DatabaseName property of the datacontrol to something like this:
datacontrol1.databasename = app.path & "\YourDB.mdb"
If I am wrong, come back here explaining more your environment.
And please, next time you post a question, turn off "caps lock".
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com