[AccessD] I just gotta vent

Salakhetdinov Shamil mcp2004 at mail.ru
Fri Dec 13 14:05:22 CST 2013


 Hi John --

I didn't know about this bug, sorry.

Just out of curiosity I have:

- created a bound test form, 
- set its recordsource to filter out all records (ID = -1);
- set AllowAdditions = False;
- created a search textbox named txtSearch in the form's header;
- created a search value copy textbox named txtCopy in the form's header;
- set OnChange event procedure to

Private Sub txtSearch_Change()
    txtCopy.Value = txtSearch.Text
End Sub

- opened test form in Normal view and typed a char in txtCopy  textbox - *bang*

2185 - You can't reference a property or method for a control unless the control has the focus.

In my test I have used Win8 and MS Access 2013. 

There seems to be no effective workaround of this bug.

This is a typical bug case one of many others, which forced me to abandon MS Access/VBA development.

Thank you.

-- Shamil

Friday, December 13, 2013 9:28 AM -05:00 from John Colby <jwcolby at gmail.com>:
>>Not sure I follow that. As Shamil said, what are you using to 
>determine the focus? Screen.ActiveControl?
>
>The control HAS the focus.  I am TYPING IN IT.  In the ONCHANGE event I 
>ask for ThixCtl.text and am told "the text property is only available if 
>the control has the focus"
>
>EXCUSE ME?
>
>How can the OnChange be firing if the control does not have the focus.
>
>"By design" means that we have pretty toolbars to design and haven't got 
>time to fix bugs that have been around for TEN YEARS.
>
> > Don't get that. I use unbound controls all the time for searches.
>
>I don't doubt that.  What you DON'T do is use the .text property to do 
>it because "the control doesn't have the focus".  Even though I am 
>TYPING IN IT.
>
>BUG folks.
>
>Understand that this works just fine IF the (bound) form had a recordset 
>displaying something.  But think about it.  This is an EDIT form.  There 
>should not be a new record, this is for editing existing records.  The 
>user is not allowed to enter new records. There should not be "some fake 
>record just to allow this to work". The form should be blank and I 
>should be able to do exactly what I am doing in order to select some 
>value to go get existing records.
>
>jwc
<<< skipped >>>
>


More information about the AccessD mailing list