Question

I have a split form view with data coming from linked sql server (2008).

How do I go about updating the record?

Currently, it will not let me change anything in the text boxes i assume this is because the data is coming from linked tables?!

In order to update do i have to create command and coonn objects and program it in the usual vb manner?

And if so, what is the syntax for referencing the linked tables when creating the update query?

On my split form I dropped a button on there and I can see options to make it run macro, run code, etc etc, which one is suitable?

many thanks,

KS

Was it helpful?

Solution

First make sure the table was not linked read-only.

When you link to a remote table, Access will make it read-only if it is unable to identify a primary key or another combination of fields to uniquely identify each row. Sometimes, but not always, it may ask you to tell it which field(s) to use as the primary key if it is uncertain.

But this issue is simple to check. Open the linked table directly in Datasheet View and see whether you can edit any values. If not, re-link the table and look for an option to inform Access about the primary key.

If the link is not read-only, make sure your form's Allow Edits property is set as Yes.

Also you could try a simple form rather than a split form to determine whether something about the split form is causing the problem.

OTHER TIPS

Solution:

MS Access barfs when trying to register tables with a primary key of type BigInt which is 8 bytes, Access can only handle Ints of 4 bytes. Workaround is below:

  1. Drop the constraint (bigint PK) in SQL table
  2. Create a new primary key (int) with identity seed
  3. Link the table in MS Access
  4. Drop new constraint (int PK) & Re-Add your previous constraint (bigint PK) in MS SQL

Voila!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top