Allowedits=NO but the edit is enabled? POSSIBLE BUG???

A

ApexData

I have a single form that is page tabbed.
I have Allowedits, Allowdeletions, Allowadditions all set to NO.
No changes are being made to these properties.

I have a txtBox that assigns a value to another text box in the OnExit
event.
When this happens, the RecordSelectors mysteriously shows the edit pen.
The whole record allows for changes at this point, although the
Allowedits is still set to No.

Private Sub txtZIP_Exit(Cancel As Integer)
MsgBox Me.Allowedits ' give me false as expected
Me.txtSTATE = "NJ" 'txtSTATE becomes NJ as expected
MsgBox Me.Allowedits ' give me false as expected
End Sub

The txtSTATE value changes, as expected, but the entire record becomes
edit enabled, despite
the Allowedits staying at No.

I checked my code, and can't seem to find any reason for this behavior.
When I scroll to the next record, the RecordSelectors edit pen goes off
and edit becomes disabled.

ANY KNOWN BUG???
 
D

Douglas J. Steele

See whether saving the record immediately solves the issue.

Private Sub txtZIP_Exit(Cancel As Integer)
Me.txtSTATE = "NJ"
Me.Dirty = False
End Sub
 
M

missinglinq via AccessMonster.com

That does fix it, Doug! BTW, adding Me.AllowEdits = False after the
assignment does not fix it! And I'd vote for YES, it is a bug! Never heard
of it before. Does MS have a mechanism for reporting bugs?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
D

Douglas J. Steele

I'm sure there's a web interface somewhere, but checking on under
www.microsoft.com, all I could come up with was
http://support.microsoft.com/gp/contactbug

To me, the bug is that it lets you set the value in code even though you've
said AllowEdits = False. Since you told Access not to allow updates, and
then you wrote explicit code to do an update, I'm not surprised it gets
confused. <g>
 
M

missinglinq via AccessMonster.com

I'd have to agree, Doug. With AllowAdditions set to Yes, for example, Access
throws an error if you try going to a new record thru VB, telling you that
you can't go to that record, so with AllowEdits set to Yes, it should do the
same thing when you try to assign a new value to a control thru VB. OMG,
Access is inconsistent!!! Who'd a thunk it?
 
M

missinglinq via AccessMonster.com

Sorry, meant to say withAllowAdditions set to No and AllowEdits set to No!
Been up 72 hours, gotta get to bed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top