
Writing directly to linked tables in Access97
This is an excerpt from Access Help...
If object refers to a QueryDef, or a dynaset- or snapshot-type Recordset,
or if source refers to an SQL statement or a TableDef that represents an
attached table, you can't use dbOpenTable for the type argument; if you do,
a trappable error occurs.
Try leaving the dbOpenTable off. this should default to the recordset or
dynaset type depending on what version of Access you are using..
good luck.
--
Mark J. Brown
QuickStart Technologies, Inc.
http://www.*-*-*.com/
1500 Quail Street 6th Floor
Newport Beach, CA 92660
: I am trying to add a new record directly to a table in Access97. Before
: I split the database into a front and back end, this worked fine. Now
: it says it is an illegal operation. Here is the code I used to perform
: this before I split the DB. "CallLog" is an attached table from the
: backend. The line that gives me the error is 'Set MyTable = .....'
:
:
: Dim MyDB As Database, MyTable As Recordset
: Set MyDB = DBEngine.Workspaces(0).Databases(0)
: Set MyTable = MyDB.OpenRecordset("CallLog", DB_OPEN_TABLE)
:
: MyTable.AddNew
: MyTable![CompanyName] = [CompanyName]
: MyTable![City] = [City]
: MyTable![State] = [State]
: MyTable.Update
:
: I certainly appreciate any help that I receive. Thanks in advance.
: Joe Ainsworth
: