Copying the same form but changing the data source.

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

Guest

Hi,

I need some advice...

I am setting up a performance/salary database for staff where I work. We
collect information on a weekly basis. I thought I may be able to include
information for each week of the month on one form. There is too much
information so I have created a form for one week only.

Although I could include an option which would filter for week number, it
would mean having four records for each person. The option I prefer (but
hesitating over) is to create four separate forms (one for each week). I can
create replicate the first table three times. What I would like to know is
whether I can copy the form three times and change the source of information.
I don't really want to have to start each form from scratch.

cheers in advance.
 
scubadiver said:
Hi,

I need some advice...

I am setting up a performance/salary database for staff where I work. We
collect information on a weekly basis. I thought I may be able to include
information for each week of the month on one form. There is too much
information so I have created a form for one week only.

Although I could include an option which would filter for week number, it
would mean having four records for each person. The option I prefer (but
hesitating over) is to create four separate forms (one for each week). I
can
create replicate the first table three times. What I would like to know is
whether I can copy the form three times and change the source of
information.
I don't really want to have to start each form from scratch.

cheers in advance.

Open the form in design view and choose "Save As", then set each forms data
source as required. But why would you want to do this? A single form with
different data sources is definitely the preferred option. If you can't use
a built-in filter (filter by form for example) then create queries for your
various scenarios and change the data source in code from, for example,
command buttons or an option group on your form. The sytax would include
something like:

Me.RecordSource = "qryMyQuery"

HTH - Keith.
www.keithwilby.com
 
If I use one form and a filter, each person will have four records (one for
each week).

Or is there an alternative that I don't yet know about?
 
scubadiver said:
If I use one form and a filter, each person will have four records (one
for
each week).

Or is there an alternative that I don't yet know about?

Filter for the person *and* the week number?

Keith.
 
There's no such product as "Access NT".

Keith isn't implying there's an option to change the data source when
saving. Save the form, then go into the new copy and change its data source.

I definitely agree with him, though: there's no logical reason for having 4
identical forms. You're only setting yourself up for a maintenance
nightmare. Figure out some way to determine which data source you want when,
and change it dynamically in the one form.
 
Access 2000!!! :-)

The only reason I would consider having four forms (each with a different
week) means team leaders within the department wont get confused about where
to enter data for each member of staff on a week-by-week basis. I personally
can't envisage any problems with that.

So the easiest thing would be for each person to have four records in one
form. I am not an experienced user and I can't see any alternative.
 
You could have a combobox that lets them select a week number, or have an
option group that lets them pick the week number, and use that information
to limit what's on the form to a single week.

You could default to the current week if you want.
 
Back
Top