Charlotte Foust
charlotte.foust at gmail.com
Fri Dec 13 11:59:37 CST 2013
John, where are you seeing the exception? Is it in a popup error message or when you're stepping through the code? The text property isn't available from the IDE as I recall, because the focus is in the IDE. Anybody else have a different experience with that? It sounds like you want to make the textbox behave like the textbox portion of a combobox. I generally force the user to click a search button or something to make sure the textbox value is available. Charlotte. On Fri, Dec 13, 2013 at 6:28 AM, John Colby <jwcolby at gmail.com> wrote: > >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 > > > On 12/13/2013 8:38 AM, Jim Dettman wrote: > >> <<1) The text box CAN ACCEPT the focus but Access refuses to believe that >> it has the focus IF there is no data in the form.>> >> >> Not sure I follow that. As Shamil said, what are you using to determine >> the focus? Screen.ActiveControl? >> >> <<2) TxtBox.Text is not available unless the control has the focus.>> >> >> That would be correct. .Oldvalue is the record prior to editing, >> .Value >> is the current value or the control, and .text is the keystroke buffer >> before it has been committed to the control. >> >> <<3) ONLY txtbox.Text has the actual value in the control for each >> character typed in. TxtBox.Value is only updated when the control loses >> the focus.>> >> >> Correct. >> >> <<4) So at least one record has to be displayed in the form BEFORE the >> search can be used.>> >> >> Don't get that. I use unbound controls all the time for searches. >> >> Jim. >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby >> Sent: Thursday, December 12, 2013 02:44 PM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] I just gotta vent >> >> Trying to do some search kind of stuff using a text box to allow a user >> <<snip>> >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >