DDL stmt on link table

G

Guest

Hi
I trying to reset the auto number in a linked table and getting this error:

"Cannot execute data definition statements on linked data source"

I must keep the data in a separate mdb than where the forms/modules are.

Is there a way around for this problem?

Thanks
Mohan
 
D

Douglas J. Steele

Ignoring the fact that there's no real legitimate reason to reset autonumber
fields (they're intended to be practically guaranteed unique values that can
be used as primary keys, and 236542, 236544, 236545 serves that need just as
well as 1, 2, 3), you have to use the DDL on the database where the tables
exist (i.e.: the back-end), not the database where the code's running (the
front-end).

What code are you currently using to run the DDL?
 
G

Guest

Hi

On a second thought, I decided to leave the auto number alone. So I don't
need to do any DDL in this case. However, If I need to call a procedure or
macro from a different access file, how would I do this. Thanks for your
comments

For example, if I have a macro in the back-end file and I want to call this
macro from the front-end file.

Thanks
 
D

Douglas J. Steele

Why would you do that? Back-end files are supposed to be data only, no code.

One way to access code in another database is to set a reference to it
(under Tools | References in the VB Editor)
 
G

Guest

Its kind of complicated. I have two front end files (mdb files) accessing
one data file. The reason I have two front end file is to implement a qick &
dirty security (by keeping in two different areas of network controling
security by domain control). The proper way to do is to implement security
within access but we don't have time for this.

So I thought, I will put some of the common code for both fron-ends in the
data file and call it from the front-end file (although its not the proper
thing to do)

Another way is to use those common code (mostly functions) in separate
add-in file and use in both front end.?

Thanks
 

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