Calling private sub from different form

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I have a main record form (A) from which a user can
retrieve a record by typing in an ID and
clicking 'Retieve'. The user could also click search and
a second form (B) pops up to provide a list of all records
which they can filter using a selection of drop-down
boxes. Currently, when a user selects a record from B, B
is hidden and then code similar to that behind A.Retrieve
runs (I'm pushing and pulling all data, not using Access
real-time form accessing by the way). What I would like
to do is simply return the ID selected to A and then call
the private sub Retieve_Click in A from B (thus meaning
that I only have one version of the Retrieve code to keep
up-to-date) ... BUT ... I don't want to use acDialog as
that will involve closing B rather than hiding it and thus
the user's search preferences will be lost. Any ideas how
to call a private sub on A from code in B??!

Many thanks in advance,

Simon

P.S. Sorry for the essay!
 
Hi Simon,

Please see my reply in microsoft.public.access.forms

Rather than posting the same message to more than one group (multiposting)
please cross-post (send the one message to all groups at once). To
Crosspost, put all of the newsgroups into the Newsgroups field in the
message header. In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times.

See http://www.mvps.org/access/netiquette.htm for more information.
 
Back
Top