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!

AllowEdits not working.

Status
Not open for further replies.
Jan 21, 2005
46
0
0
US
Hi. I use the following code to manipulate allowedit property on various forms in my database. With a command button, I can successfully lock/unlock the record. Today, I've encountered a form that doesn't allow this. The following is the code I put in Form_current event.
Private Sub Form_Current()

If Me.NewRecord Then
Me.AllowEdits = True
Me![Serial Number subform].Form.AllowEdits = True
Else
Me.AllowEdits = False
Me![Serial Number subform].Form.AllowEdits = False

End If
End Sub

This form is from a database I created long time ago, and except Microsoft Calendar Control 10.0, it has same references with my other working databases. I spent the whole day to figure out this, but no luck. what could be a reason? I tried various codes in addition to above one, but no luck. Thanks in advance.
 
Hi,

Try checking few things

1. Form might be attached to a query which cannot be updatable.

2. Try decompiling database by opening MS Access with decmpile switch and then run compact and repair database.



Cheers!
ÙÇãá

It's important to learn the rules so that you know how to break them.
 
Thanks for you comment, Agif. The form contains 6 subforms, and the main and all the subforms are bound to a table which is updatable. I compacted and repaired database, but still not working. Any other ideas? Thanks.
 
Can't say anything without actually looking at the form. I am sure that there would be some tiny error somewhere but connot tell without lookig @ database.

Cheers!
ÙÇãá

It's important to learn the rules so that you know how to break them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top