How bout this one?
I have a form that has 2 unbound controls that the user simply types
the data into: control 1 is ID#, control 2 is acct#. ID# is uniqu
to the person. Acct# changes on each visit. The form looks for
a compares th entered ID# with the ID# returned from an Acct#/ID# table. If
the acct# is already on file, a form with subforms is activated with the ID#
record selected by on activate find coding.
The subform is the child of the mainform via ID# and the acct# is
selected there via the same on activate code which looks like this:
on activate:
docmd gotocontrol"id#"
docmd findrecord forms![1st Form]![ID#],,,,true docmd gotocontrol "acctnrs"
'this is the subform name docmd gotocontrol "Acct#"
docmd findrecord forms![1st form]![[acct#],,,,true
This works find until a subsubform control is accesed which needs to activate
the main form gain. And this triggers the on activte again giving an error.
Tell me about the the diffrnce between onopen and onactivate. In the
firstform, the second is activated via docmd openform which is already open
for speed purposes.
There's got to be a better way!
--- Opus-CBCS 1.14
---------------
* Origin: FOG-Line: Ankeny, IA (1:290/627.0)
|