Hi Richard,
I'm still not sure I understand how it will help you to have one
control display the name of the one that has the focus.
Regarding speeding up your form you are probably on the right track
to use a search form that limits the number of records returned to
your data form. It is always best to restrict the number of records
returned to the smallest number possible. This solves and prevents
many problems.
For general tips on improving performance see
http://www.granite.ab.ca/access/performancefaq.htm
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Richard wrote:
Hi Sandra
Thanks for your help.
The reason is that the recordset is growing bigger and very slow to
open(50 secs to open). I am planning to open only one most recent
record on the form(view only). The users will use two unbound text
boxes, one for criteria and one for field, which is the bound to a
query for the form's record source.
Am I doing the right thing here? Or is there any other way?
Thanks again
Richard
Create a function in the form's class module - (replace Text10 with
the name of the your unbound control).
private function DisplayCtlName()
Me.Text10 = Me.ActiveControl.Name
End function
Then select all of the controls that have a click event and while
all are selected put the following into the Click Event property:
=DisplayCtlName()
Any particular reason why you are doing this? Just curious . . .
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this
newsgroup.
Richard wrote:
Hi
I need to populate an unbound textbox with the names of the
controls I click on. Should I set up in every control's onclick
event and write:
me.txtcontrolname = me.control.name
or is there an easier way? I have quite a lot of controls in the
form.
Thanks in advance
Richard