Error 3270 property not found

spikepl

Eledittingent Beliped
Local time
Today, 06:12
Joined
Nov 3, 2010
Messages
6,134
A2007. I get the 3270 error when saying Cancel in BeforeUpdate of a combo (whether or not I Undo the combo). I have no clue where it comes from, the debugger does not help: I step through my BeforeUpdate, and the next thing after exiting the sub is whammo.. error 3270.

Initially the thing just said property not found, but I got the error out of the form's OnError handler.

The combo is a bound control in rows displayed in datasheet view of a subform.

It's a bit tricky to extract a skeleton version to illustrate the error, so before doing that I was hoping someone might provide some hints as to how to track down this error. I could set the handler to ignore it , since apparently nothing bad happens, but it's just a bit annoying and inexplicable.
 
It turned out to be easy to reproduce - simply cancel the update in a combobox embedded in a row and it comes up with the Property not found.. A small table with the combo embedded attached. In the combo's BeforeUpdate I cancel the update . and get the error.
 

Attachments

Interesting error spikepl. I can only conclude that this must be something that the developers have overlooked. I tried it in Single Form and Continuous Form View and it worked. I also thought that perhaps if the Row Source was a query it will work and it didn't. It just doesn't work in Datasheet view.

See attached a workaround.
 

Attachments

Thanks vbaInet - I spent quite some time yesterday before reaching the conclusion that it possibly was a built-in "feature" :D

And it was. Never thought about using DoCmd.CancelEvent to bypass the "feature" generated by Cancel=True
 
If this feature also is present in A2010, then perhaps it would be sensible to send a copy to the codemeisters i Redmond. Ye possessors of A2010 who read this, do not abandon all hope but yell so MS hears it.
 

Users who are viewing this thread

Back
Top Bottom