Changing the Table a form uses

  • Thread starter Thread starter Kayleen Huggart via AccessMonster.com
  • Start date Start date
K

Kayleen Huggart via AccessMonster.com

I have a form that I would like to duplicate, only I wish to use a
different table which contains the same fields. Anyone know how I can
change the table which my form uses without having to go through each and
EVERY field in the form?? This form is a huge form and it will take a long
time, so naturally, I'm looking for a simple way.

Thanks!
Kayleen
 
Probably the easiest way to do this (assuming everything in both situations
is identical including validation checks, etc. is the same) is to use just
the one form. The in the Open event of the form, set the form's Record
Source property to the table you want to work with.
 
Form1 has identical but fewer fields than form2. Form1 is for data entry,
Form2 displays the data entered in Form1 and the displayed fields are
locked. Would your suggestion work in this case?

I'm still a newbie and my knowledge is limited.

Ultimately, what I'm trying to do is create a baseline schedule. When the
baseline is set the user should be able to click a button, "Set Baseline",
that locks the populated fields so they are unchanged. These fields are
then appended to Form2 to be displayed only (not populated). In Form2, the
user can use the baseline fields and compare to the actual fields (which
are populated in Form2)to determine actual duration of completion. Does
that make sense?

Thanks.
Kayleen
 
Being that you are a newbie, I think you better take the slow tedious way of
doing it by hand to create the other form.
My original idea would still work, but would take some medium level coding
skills to accomplish.

I do not mean to insult at all, I am only being realistic. Here are some of
the issues you would have to deal with:

You would have to make the controls on Form2 that are not on Form1 invisible
during data entry and unlock the cotrols. When you are doing the things that
you do with Form2, you would have to make those controls visible and lock all
the controls you don't want changed.

If you think you would like to tackle it (You will sooner or later if you
are serious about being an Access developer), I will be happy to coach you
through it.

I do have one question. Why are there 2 forms, one for data entry and one
for viewing? The only reason I can see for this is that some users can only
view while some can do data entry.

The problems with multiple forms that are doing pretty much the same thing
are that if any changes need to be made, you have to do them in two places
and the more objects (forms, etc) you have, the larger the database.

So, with all that said, let me know if you are game for a confusing and
frustrating exercise that when done, will make you a better developer and be
very satisfying when you get it working, let me know.
 
Back
Top