Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subforms and Linked tables problem.

Status
Not open for further replies.

eligiomh

Programmer
May 7, 2008
6
0
0
ES
Hello.

I'm upsizing an Access 2000 application to Access 2003 + SQL Server 2005, and I've found something I cannot get through.

The original application was a file 'app.mdb' with all tables, and another file 'app_exec.mdb' with all forms (tables in 'app_exec.mdb' were linked to 'app.mdb').

There was a table called T_Order (I will call it A) and another table called T_Order_Line (I will call it B).
* Table A fields: Id (Primary Key) and Customer_Id
* Table B fields: Id, Order_Id (Both are Primary Key) and Article_Id.

There was one form (called frm_A) that includes a subform (called frm_B). The form frm_A allows navigation, adding, deleting and updating 'A' table. The subform frm_B shows data related to current 'A' record.

The subform frm_B allows you to add/delete/update records to the table 'B'.

Now I only have one file 'app.mdb' with forms and tables are linked to a SQL Server 2005 database (I use the Access export wizard).

frm_A and frm_B are related using "Link master field" and "Link child field".

The problem is that I cannot add new data to the frm_B. Navigation in the form works. In the subform frm_B I see data related to the current record. I can delete/edit data from frm_B. But I cannot insert new data on it.

When I click on "Add New Order" button, I execute the code "DoCmd.GoToRecord , , acNewRec". In the old application, frm_B was cleared and ready for appending new data. But with linked tables to SQL Server, I cannot add new data!

I have checked that if table 'B' is stored locally in Access, everything works fine. But if I use table 'B' linked in the SQL Server, I cannot add data.

So, I am sure that the problem is only with table 'B' and the subform, but I cannot understand what happens.

Any idea?

Thanks !!!!


 
What is the recordsource for frm_B. Navigation?
If this a query or A Sql Statement with a join you might need to set the UniqueTable Property
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top