P
paddy
Your mission, if you choose to accept it………
I made an earlier posting regarding disabling the Replace tab on the
find/replace dialog box. Thanks to frekazeud, I was directed to the The
Access Web (mvp) where I “saw the lightâ€. As a result I figured out how to
disable Replace on forms, forms w/subforms and forms w/subforms that have
subforms. The latter is causing me the most frustration. I have formA which
has a TabCtrl with 3 Tabs. I currently have search buttons on the master and
all subforms with the master search button visible from all Tabs and
Subforms. Each subform also has its own search button, no problem if users
click the associated search button, but……, if they can, they will. Before I
can hide the subform search buttons I need to make the master search button
work better. The easy way would be to hide the unavailable search buttons,
but, who said it was going to be easy.
Here’s the layout of formA.
Tab1 has fields based on the source table, no problem.
Tab2 has a subform1 (master/child to formA fields) that has subform1a
(master/child to subform1), both have searchable fields.
Tab3 has subform2 (master/child to formA fields) that has subform2a
(master/child to subform2). Subform2 has no searchable fields, subform2a does!
Events are incestuous on subforms with subforms. For example when I use the
on_enter of subform1a, the on_enter of subform1 also fires, sometimes. The
got_focus of subform1 does not fire when moving between subform1a and
subform1 because subform1 already has focus because you’re already in
subform1 when you’re in subform1a and on and on. This is important because
the Find/Replace needs to know from where it is being called, or it defaults
with the Replace tab visible.
I am trying to trap the [sub form control] name and use a select case to
process the appropriate code. So far it works OK if used in the right
sequence, and only once, but…….. Also when I use the “.parent†for the
[Screen.PreviousControl] or was it the [sub form control] .Parent, I’m
getting soooo confused, I’m getting the TabName.
I am currently using the on_click of each field to send the
“SubFormControlname†to a ScratchForm, but it is also developing some issues
and only acceptable because I only have a few controls on my current
subforms.
Any ideas on how I might trap the [subform control name] (or is there
something better to trap?) ?
Thanks
I made an earlier posting regarding disabling the Replace tab on the
find/replace dialog box. Thanks to frekazeud, I was directed to the The
Access Web (mvp) where I “saw the lightâ€. As a result I figured out how to
disable Replace on forms, forms w/subforms and forms w/subforms that have
subforms. The latter is causing me the most frustration. I have formA which
has a TabCtrl with 3 Tabs. I currently have search buttons on the master and
all subforms with the master search button visible from all Tabs and
Subforms. Each subform also has its own search button, no problem if users
click the associated search button, but……, if they can, they will. Before I
can hide the subform search buttons I need to make the master search button
work better. The easy way would be to hide the unavailable search buttons,
but, who said it was going to be easy.
Here’s the layout of formA.
Tab1 has fields based on the source table, no problem.
Tab2 has a subform1 (master/child to formA fields) that has subform1a
(master/child to subform1), both have searchable fields.
Tab3 has subform2 (master/child to formA fields) that has subform2a
(master/child to subform2). Subform2 has no searchable fields, subform2a does!
Events are incestuous on subforms with subforms. For example when I use the
on_enter of subform1a, the on_enter of subform1 also fires, sometimes. The
got_focus of subform1 does not fire when moving between subform1a and
subform1 because subform1 already has focus because you’re already in
subform1 when you’re in subform1a and on and on. This is important because
the Find/Replace needs to know from where it is being called, or it defaults
with the Replace tab visible.
I am trying to trap the [sub form control] name and use a select case to
process the appropriate code. So far it works OK if used in the right
sequence, and only once, but…….. Also when I use the “.parent†for the
[Screen.PreviousControl] or was it the [sub form control] .Parent, I’m
getting soooo confused, I’m getting the TabName.
I am currently using the on_click of each field to send the
“SubFormControlname†to a ScratchForm, but it is also developing some issues
and only acceptable because I only have a few controls on my current
subforms.
Any ideas on how I might trap the [subform control name] (or is there
something better to trap?) ?
Thanks