>Is there a way to, at the beginning of a form, to add the data files to the data environment programmatically, or set a path for the DE to use before opening files? The problem I am having is that locally, or over the LAN, an app works just fine, and opens the files it needs using path strings, which change quite regularly, for example:
>
>
>thislanfile=&mlanpath+'abc.dbf'
>USE "&thislanfile" IN 0
>
>
>That works great, but when a user RDP's in, it doesn't work. Using messagebox, I can see that the machine/folder/dbf is correct, but I get error 1 in the 'use' line. Any help will be much apperciated!
>
>Thanks.
Would
Yes be helpfull?
A DE has a [Before]OpenTables event, a Form a Load event. Here you might set paths etc
Check the help there
A form has a BindControl property, also usefull.
Remember that controls do not bound to a table, they bound to an alias.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]