>> Multiple instances of a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I need some sage advice. I want to be able to open multiple instances of
a form.

At the moment with one instance, I clear a temp table then populate the
temp table with records. The temp table records comprise existing records and
possible additional records (That is, from a possible selection a user has
chosen a few). This is so that a user is always presented with all the
possible entries for the One side of the relationship. (I could just append
all the possible entries for each one side of the relationship. But I want to
avoid storing blank records.)

The problem is that there is only one temp table that would be called by
each instant of the form in a multiple instance scenario.

My question is: what are the alternative methods to achieve the desired
outcome and, which is the best and why?

Any ideas or suggestions appreciated :-)

Many thanks
Jonathan
 
If absolutely necessary the form could check all table names Tmp1,
Tmp2, Tmp3 etc. until it found one that doesn't exist; then it would
create that one, for its own use. You could do all that in code. But it
sounds really nasty, to me.

As an alternative, what about adding an IDNumber field to the single
temp table? Then, the form just finds the current largest value of that
field - adds one - then uses that new # to identify its own records in
that table. Ie. all the instances of the form use the same temp table
in a cooperative manner, each one only using its own records.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
TC said:
If absolutely necessary the form could check all table names Tmp1,
Tmp2, Tmp3 etc. until it found one that doesn't exist; then it would
create that one, for its own use. You could do all that in code. But it
sounds really nasty, to me.

As an alternative, what about adding an IDNumber field to the single
temp table? Then, the form just finds the current largest value of that
field - adds one - then uses that new # to identify its own records in
that table. Ie. all the instances of the form use the same temp table
in a cooperative manner, each one only using its own records.

HTH,
TC (MVP Access)
http://tc2.atspace.com
TC, Thats an interesting approach. I'll give it a go.

I must admit that I was thinking about creating a class to hold the values,
but I couldn't think how to set the class as the continuous form's record
source.

I'm still interested whether there is another approach that someone has
found works for them.

Many thanks
Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top