[AccessD] Select one of several open forms

Darren - Active Billing darren at activebilling.com.au
Mon Oct 10 08:24:21 CDT 2011


Hi Arthur
Something like...
	 Forms!formA!SomeControlOnFormA.setfocus
Is what I do.
I always have a "transparent" command button on each and every one of my
forms called "TabBlank".
It has its tab property set to zero and is always my 'resting place' for the
cursor when I need one, and an attachment point too (as in this case) when I
need one.
I can refer to it in code when things are 'running' (Send the cursor there)
and when I need to disable controls, I send the focus there too for neatness
to avoid "you can't disable the current control" messages - That sort of
stuff.
I don't always like returning to a data entry field (Unless required). As
access (depending on configuration options) usually highlights the value in
the field when the focus arrives.
Users (I dunno why) often like to hit the space bar when returning to their
screens especially if their screen saver is on. Often deleting the contents
of the selected field.
So I usually do something like 
	Forms!frForma!TabBlank.setfocus
Hope this helps
See ya
Darren

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, 11 October 2011 12:04 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Select one of several open forms

I have a main form, another form (FormA) and a popup (FormB). When the user
enters values in the popup, I hide that form. The intent is to then copy
some values back to FormA and then close FormB. That part seems to work
fine. The problem is that control is returning to the main form rather than
to FormA. I recall that there is a way to set the focus specifically to any
given open form but I can't remember it. Is it as simple as
"FormA.SetFocus"?

TIA,
Arthur
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list