cmd code doesnt work w splitdb

  • Thread starter Thread starter britton
  • Start date Start date
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!
 
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.
 
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
 
Back
Top