Re: Form "relations"
- From: "Nick Coe \(UK\)" <classicnickNOSPAMAT@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Feb 2006 07:33:13 -0000
I agree. That leaves you with using a global variable. Can
be tricky to make sure it is cleared and reset at the
appropriate places.
Another thought - How about having a table in which you
store the calling form name and the called form name?
Use DoCmd.RunSQL and you won't have to worry about
references and recordsets. In these circumstances I find it
helps to get the old pencil and paper out and rough out a
flow chart, questions or pseudo code of what I want to
happen.
1/ Delete any existing rows? Which ones?
2/ Append new rows or should I update?
3/ Do I want to store anything else with this, user name,
time called etc?
and so on until I can write the code out.
Personally I'd go for the global variable unless you need to
store the name(s) between sessions.
--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.mrcomputersltd.com/ Repairs Upgrades
In news:j3XGf.272$UN.233@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
Bill typed:
Nick,
I don't think I can do the latter suggestion, as I have to
open the form in acDialog which stops execution of
subsequent statements until the form closes. Or, at
least that's my understanding of one of the affects of
acDialog.
Bill
"Nick Coe (UK)" <classicnickNOSPAMAT@xxxxxxxxxxxxxxxxxx>
wrote
in message news:OSBqV0gLGHA.2828@xxxxxxxxxxxxxxxxxxxxxxx
Pass the name of the calling form in a global variable.
Or have a hidden unbound control on the new form and set
it
to contain the calling forms name just after the calling
form
opens the new form. That is in the code that actually
opens
the new form. I haven't done this for a few years so
could
have remembered it wrong. --
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.mrcomputersltd.com/ Repairs Upgrades
In
news:ntWGf.244$JR6.202@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
Bill typed:
I have a form that is opened by a couple of other
forms but is not in a parent/child relationship with
those forms. In that form then, how do I find the
name of the form that opened it? I.e., without the
parent/child relationship, something like
Me.Parent.Name isn't a valid use of the property.
Thanks,
Bill
.
- Follow-Ups:
- Re: Form "relations"
- From: Bill
- Re: Form "relations"
- References:
- Form "relations"
- From: Bill
- Re: Form "relations"
- From: Nick Coe \(UK\)
- Re: Form "relations"
- From: Bill
- Form "relations"
- Prev by Date: Re: Where clause giving mixed results
- Next by Date: Re: Designing a counter
- Previous by thread: Re: Form "relations"
- Next by thread: Re: Form "relations"
- Index(es):
Relevant Pages
|