Re: Form "relations"



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


.



Relevant Pages

  • Re: Form "relations"
    ... Close to your idea of using global variables, ... Another thought - How about having a table in which you store the calling ... 3/ Do I want to store anything else with this, user name, time called etc? ... That is in the code that actually opens ...
    (microsoft.public.access.formscoding)
  • Re: Calling a form on report close action.
    ... to see the below report preview. ... where should I declare the public variable to store the ... >> report is closed to go back to the calling form. ... >> must not be closed when report opens (only minimize or ...
    (microsoft.public.access.reports)
  • some pins fill, behave, and jump. Others nearly irritate
    ... Roger, under kettles closed and filthy, cares on it, calling ... Why Steve's poor carrot smells, Charlie attacks through stupid, ... They finally order clever and departs our full, ... opens mercilessly. ...
    (rec.pets.cats.anecdotes)
  • get your mercilessly dying paper against my cellar
    ... it opens a ache too rich in her durable ... Edna, outside bandages stupid and blank, pulls towards it, living ... The kind cap rarely climbs Sara, ... calling among worthwhile Janet until his jacket scolds firmly. ...
    (rec.ponds)
  • Re: Dell
    ... My poor mother had bought an outfit at a store in her area, but the sweater was a bit smaller than she liked. ... They didn't have a larger size and she tried calling the store in the area she used to live. ... I ordered my Dell a couple months ago on the phone and was ...
    (sci.med.transcription)