You can't use dbOpenTable with linked tables. Try changing it to
dbOpenDynaset, or just leave it out, as dbOpenDynaset is the default for
linked tables.
>I have a linked SQL Server table in my database. I can edit and add
> records to this table using bound forms. However, in my database I
[quoted text clipped - 26 lines]
> Does anyone know how to open a SQL Server linked table for additions
> with VBA code?
PMFBI
I wondered also if wouldn't need "dbSeeChanges" probably:
Set myTable = mydb.OpenRecordset("tblReportData", dbOpenDynaset,
dbSeeChanges)
apologies again,
gary
Brendan Reynolds - 20 Jul 2005 16:04 GMT
No apology necessary, Gary, I'm glad you thought of that, as I had forgotten
about it.

Signature
Brendan Reynolds (MVP)
> PMFBI
>
[quoted text clipped - 6 lines]
>
> gary
Tony Toews - 21 Jul 2005 00:51 GMT
>I wondered also if wouldn't need "dbSeeChanges" probably:
>
>Set myTable = mydb.OpenRecordset("tblReportData", dbOpenDynaset,
>dbSeeChanges)
Ayup. I sure wish MS would just make this the default for SQL Server
linked tables and be done with it.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm