Front/backend

H

Harmannus

Hallo,

In my frontend i want to check for a valid path to a backend by using a path
that is set in a table in another database. If the backend is not found it
should use the stored path to the backend. I use DbLookup but get errors.

Anybody suggestions on how this can be done?

My code: sServerpath = DLookup("[PathServer]", "tblFrontend", "[filename]=
'frontend.mdb'")

Thanx for any tips.

Regards,
Harmannus
 
J

John Vinson

Hallo,

In my frontend i want to check for a valid path to a backend by using a path
that is set in a table in another database. If the backend is not found it
should use the stored path to the backend. I use DbLookup but get errors.

Anybody suggestions on how this can be done?

My code: sServerpath = DLookup("[PathServer]", "tblFrontend", "[filename]=
'frontend.mdb'")

What's actually in tblFrontend? What errors are you getting?

Note that this DLookUp will NOT check to see if it's a valid path - it
will just look up the value of the field PathServer in the (local or
linked) table tblFrontend. You say "set in a table in another
database" - what have you done to make tblFrontend available to this
database?
 
H

Harmannus

Hallo,

The mdb updater contains a table with the PathServer hard coded. In the
frontend i want to refresh the link to the server path based on the
pathServer in the mdb updater.

sServerpath = DLookup("[PathServer]", "tblFrontend",
"[filename]='frontend.mdb'") Doesn't fint the field PathServer the mdb
updater. Mistake in the code?!?

Thanx for any further tips...

Regards,
Harmannus

John Vinson said:
Hallo,

In my frontend i want to check for a valid path to a backend by using a path
that is set in a table in another database. If the backend is not found it
should use the stored path to the backend. I use DbLookup but get errors.

Anybody suggestions on how this can be done?

My code: sServerpath = DLookup("[PathServer]", "tblFrontend", "[filename]=
'frontend.mdb'")

What's actually in tblFrontend? What errors are you getting?

Note that this DLookUp will NOT check to see if it's a valid path - it
will just look up the value of the field PathServer in the (local or
linked) table tblFrontend. You say "set in a table in another
database" - what have you done to make tblFrontend available to this
database?
 
J

John Vinson

Hallo,

The mdb updater contains a table with the PathServer hard coded. In the
frontend i want to refresh the link to the server path based on the
pathServer in the mdb updater.

sServerpath = DLookup("[PathServer]", "tblFrontend",
"[filename]='frontend.mdb'") Doesn't fint the field PathServer the mdb
updater. Mistake in the code?!?

Thanx for any further tips...

Which .mdb file contains this code?
Which .mdb file contains the table tblFrontend?
If they are different, have you linked tblFrontend in the Tables
collection of the database containing the code? You'll need to do so
for this to work.
 
H

Harmannus

Hallo,

Thanx for the response.
Which .mdb file contains this code?
Which .mdb file contains the table tblFrontend?

The frontend database contains the code to check for a valid path. The
frontend database looks for the path in the updater.mdb with tblFrontend.

Hope this helps.

Regards,

Harmannus




John Vinson said:
Hallo,

The mdb updater contains a table with the PathServer hard coded. In the
frontend i want to refresh the link to the server path based on the
pathServer in the mdb updater.

sServerpath = DLookup("[PathServer]", "tblFrontend",
"[filename]='frontend.mdb'") Doesn't fint the field PathServer the mdb
updater. Mistake in the code?!?

Thanx for any further tips...

Which .mdb file contains this code?
Which .mdb file contains the table tblFrontend?
If they are different, have you linked tblFrontend in the Tables
collection of the database containing the code? You'll need to do so
for this to work.
 
J

John Vinson

Hallo,

Thanx for the response.


The frontend database contains the code to check for a valid path. The
frontend database looks for the path in the updater.mdb with tblFrontend.

Then the DLookUp WILL NOT WORK, as written. The frontend database does
not contain tblFrontend, either as a local table or as a linked table.
Therefore tblFrontend is an unresolved, unknown table.

I'd suggest that you either use File... Get Extrenal Data... Link to
link to tblFrontend in updater.mdb; or open a Recordset based on a
query using the IN clause:

SELECT tblFrontend.PathServer FROM tblFrontend IN
"C:\SomePath\updater.mdb" WHERE tblFrontend.Filename = "frontend.mdb";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top