Access Form Locked after linked table from sql

jamest85

Registered User.
Local time
Today, 12:45
Joined
Jan 20, 2008
Messages
52
Hi:
I am experencing very strange case.
I have two identical MS access application, only difference is one backend is MS database, another is MS Sql database.

When I run the application with the sql backend, one form just doesn't allow me to edit, even I can select value from a comboBox control.
(But the application with the MS database backend works fine).

I don't know what will casuse the problem, do I need to do something with the sql data table permmission or what?

Thank you very much.

Jt
 
Do your SQL Server tables have primary keys? They have to have primary keys to be able to be written to.
 
Hi: Bob Larson
Thank you very much for your reply.
I checked the table in SQL, it has primary key.

I am using this connection:
strSQL = "SELECT actDecsription FROM codAction WHERE actActionID = 3" '(actActionID is the primary key)
rst.Open strSQL, strCnxn, adOpenKeyset, adLockOptimistic
Set Me.Recordset = rst ' trying to use recordset to bind the form

On the form, only has a comboBox (name is:"cobBoxDescr"), what I find is:
1. if I add "actDescription" to "Control Source" of the comboBox, the the form becomes read only. (control bound)

But if I
1. leave the "Control Source" of the comboBox empty. (unbound).
2. remove the line: Set Me.Recordset = rst
3. add new line: Me.cobBoxDescr.Value = rst.Fields("actDecsription").Value
Then the form becomes editable.
At least I can make the change (or select other List values from the comboBox dropdown).

Thank you very much.

Jt
 
Hi: Bob Larson

I am trying to do a simple test here: create another combo box, put the combo box Control Source = codAction!actDecsription (using expression builder), when I open the form, the combo box has values, but if i select one of them. on the bottom of the statuse bar says: "Control can't be edited, it's bound to expression "codAction!actDecsription ".

I don't know why that happens.

Thanks.

jt
 
Hi: Bob Larson

I am trying to do a simple test here: create another combo box, put the combo box Control Source = codAction!actDecsription (using expression builder), when I open the form, the combo box has values, but if i select one of them. on the bottom of the statuse bar says: "Control can't be edited, it's bound to expression "codAction!actDecsription ".

I don't know why that happens.

Thanks.

jt

If it says that, your underlying query of the form is not updateable. Perhaps this will help:
http://allenbrowne.com/ser-61.html
 
Hi: bob
Thank you very much for your help.
After another hrs of trying, I found the problem is: I need to refersh the linked table by using: Linked table manager.

In my home, I can access the wizard:"linked table manager", but the wizard is not installed my office.

now, sitting in home, I need to figure out how to install that, I will post a new thread for this problem.

Thanks.

James
 

Users who are viewing this thread

Back
Top Bottom