| re: connecting to password protected backend
To the best of my knowledge, the password is stored in the front-end. As
long as you don't change the password and have previously connected with the
password, you should be able to run the reconnect code, but I haven't tried
it. To change the location of the link, you change the Connect property of
the TableDef object. The path must be a valid path and UNC paths are
allowed. If the back-end is on a network share, I would recommend using the
UNC path, it saves the hassel of setting up shared drives. To see if a table
is a linked table, check the Connect property. If it's not null or a zero
length string (I don't remember which right off-hand, but I think it is the
zero length string) then it is a linked table. You can also use the
Attributes property to see if it is a linked table.
You shouldn't need the code in your Open event.
--
Wayne Morgan
MS Access MVP
"Chris" <chrisw_14@hotmail.com> wrote in message
news:cfb38ed9.0404220123.2c77bbe6@posting.google.c om...[color=blue]
> Thanks Wayne,
> Great, it worked. I don't know why I didn't think of that. Another
> question. When I delete the linked tables and re-add them and it asks
> for the password, i type it in and I can connect to the backend
> tables. I then close the frontend and re-open it, it DOESN'T ask for
> the password to open the tables. Because I will install this database
> on many other machines, I am wondering if it keeps the password for
> the backend somewhere in the frontend file or on the computer.
>
> I am currently not at home to fully test all this but I am wondering
> two more things:
>
> 1) I have code to relink the frontend to another backend (with same
> table names) also with a password protect, I am wondering how it will
> affect this, whether it will ask for the password when the relink is
> being done and whether I can use code similar to what I pasted in the
> newsgroup message to do the relink.
>
> 2) Do I need the code I used on the form_open event, it seems like I
> don't. But it may depend on whether it holds the password in the
> frontend file or on the computer.
>
> I will experiment at home but if you know any more about this i'd love
> to hear it.
>
> Thanks,
> Chris[/color] |