A
Alp Bekisoglu
Hi Experts,
I have been fighting over this for sometime now but unfortunately came to
the end of my wits. I am trying to use code in a database to check its table
references for proper operation. The conditions are somewhat simple such as;
- Front-end and Back-end databases are exactly under the same subdirectory
- the routine is called from the Front-end
- One Back-end has quite a number of tables that needs to be checked for
these references, the orher has much less (7 to be accurate)
What I intend to do is to force the application to go through the routine
without user intervention and check & update all link references if they
have been changed somehow. The link references do not change under normal
circumstances.
I have my functions that return the full path, full directory structure,
just needed database file name, only the drive letter, etc... built in and
do not have any problems working with them.
I have also re-named the smaller set of linked tables (the 7) with the "b_"
prefix just to distinguish them easier to use the relevant mdb.
I can get all the necessary connection info through the above functions but
unfortunately am getting stuck where I can pass them on to the FE in VBA
that the info will be updated. Thus it looks like I need to modify one of
the several codes I have found over the net and this is where I am kindly
asking you expertise and help.
I am ready to give further details if any is needed. I have one link set to
look elsewhere (other than the directory the main app is running) for
testing.
What I need is:
- If the table name starts with "b_" then its link should be set to
";DATABASE=" & baselocation
- Else their links should be set to ";DATABASE=" & datalocation
- If any is wrong, then correct it
Both baselocation and datalocation yield fully qualified file names, i.e.
D:\Program Files\Myprogram\base.mdb
I thank in advance for any help, guidance that would/could be extend to me.
Alp
I have been fighting over this for sometime now but unfortunately came to
the end of my wits. I am trying to use code in a database to check its table
references for proper operation. The conditions are somewhat simple such as;
- Front-end and Back-end databases are exactly under the same subdirectory
- the routine is called from the Front-end
- One Back-end has quite a number of tables that needs to be checked for
these references, the orher has much less (7 to be accurate)
What I intend to do is to force the application to go through the routine
without user intervention and check & update all link references if they
have been changed somehow. The link references do not change under normal
circumstances.
I have my functions that return the full path, full directory structure,
just needed database file name, only the drive letter, etc... built in and
do not have any problems working with them.
I have also re-named the smaller set of linked tables (the 7) with the "b_"
prefix just to distinguish them easier to use the relevant mdb.
I can get all the necessary connection info through the above functions but
unfortunately am getting stuck where I can pass them on to the FE in VBA
that the info will be updated. Thus it looks like I need to modify one of
the several codes I have found over the net and this is where I am kindly
asking you expertise and help.
I am ready to give further details if any is needed. I have one link set to
look elsewhere (other than the directory the main app is running) for
testing.
What I need is:
- If the table name starts with "b_" then its link should be set to
";DATABASE=" & baselocation
- Else their links should be set to ";DATABASE=" & datalocation
- If any is wrong, then correct it
Both baselocation and datalocation yield fully qualified file names, i.e.
D:\Program Files\Myprogram\base.mdb
I thank in advance for any help, guidance that would/could be extend to me.
Alp