Dan Waters
df.waters at comcast.net
Fri Dec 13 09:06:56 CST 2013
Hi John, >From my distant memory, in Access the .text property has a purpose but is very temporary - I've never used it. Try using the .Value property instead - which you don't really need to use because it's the default property anyway. Don't use the .Text property in Access - perhaps you're thinking of programming in .Net which uses .Text to get the value of many controls on forms? With your editing form, what I would do is use the information in your search form to modify a query and then set the form's recordset to that query. What is the mechanism you've set up for getting filtered records into your form? Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Friday, December 13, 2013 8:28 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] I just gotta vent >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