cmd code doesnt work w splitdb

B

britton

I've put in cmd buttons that are set to open up other
forms that are on the same record number as the original
form by adding this code:
CurrentDb.tableDefs("secondarytablename")
("linkingfieldname").DefaultValue = Me.Likningfieldname

this worked perfectly but once I split the databse I get
the following error when hitting the command button:
"operation not supported on linked tables"

does anyone know away around this so that I can have the
cmd button do as I like as well as having split tables?

THanks in advance!
 
R

Rick Brandt

britton said:
I've put in cmd buttons that are set to open up other
forms that are on the same record number as the original
form by adding this code:
CurrentDb.tableDefs("secondarytablename")
("linkingfieldname").DefaultValue = Me.Likningfieldname

this worked perfectly but once I split the databse I get
the following error when hitting the command button:
"operation not supported on linked tables"

does anyone know away around this so that I can have the
cmd button do as I like as well as having split tables?

THanks in advance!


Why don't you just set the default value property of the form you are opening instead
of trying to modify the table? Then the fact that the tables are linked becomes
irrelevant.
 
C

chas

Hi Britton,

try pointing the code to the back-end database - something
like:

Dim db As DAO.Database
Set db = OpenDatabase
("\\machinename\sharename\database.mdb")

and then replace your CurrentDB with db

hth

chas
 

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