Duplicating info from one form to another

  • Thread starter evilcowstare via AccessMonster.com
  • Start date
E

evilcowstare via AccessMonster.com

Hello everyone, ok Im starting a new database which will involve several
forms, what I want to happen is that when a new customers details are added
in a seperate customer form at the click of a button it will copy that
information into fields on another form. I have looked about but cant find
what need, I have to use the control source so that the information is then
saved in a seperate table when the user chooses to save it so I cannot use
that to pick anything up. Im guessing something like an OnOpen or similar
might work? I just need to make sure that this table can also open up fine on
its own without the prior ne customer form being used. I hope this makes
sense.

New Customer Form >>click"estimate">>> Estimate form (customers info from
previous form at the top)

After this It will then have the option to be turned into a current job and
again copying the information but I am planning on using the same technique.

I know it isnt the best idea to have duplicates of the same information but
there are 3 stages to the jobs and all need to be saved seperatly and use
seperate IDs.

Thanks for all your help

Jay
 
J

Jeff Boyce

Jay

See comments in-line below...

evilcowstare via AccessMonster.com said:
Hello everyone, ok Im starting a new database which will involve several
forms, what I want to happen is that when a new customers details are
added
in a seperate customer form at the click of a button it will copy that
information into fields on another form.

Recall that Access tables store data, and Access forms display data. Even
though you might enter data on/in a form, the only way Access will
"remember" it is if the data is stored in a table.

So no, you won't need to copy the data from one form to another. You can,
however, have your second form look at the data (in its tables) that had
been entered via the first form.
I have looked about but cant find
what need, I have to use the control source so that the information is
then
saved in a seperate table when the user chooses to save it so I cannot use
that to pick anything up. Im guessing something like an OnOpen or similar
might work? I just need to make sure that this table can also open up fine
on
its own without the prior ne customer form being used.

I don't understand what this ('table can also open') has to do with using a
form?
I hope this makes
sense.

New Customer Form >>click"estimate">>> Estimate form (customers info from
previous form at the top)

After this It will then have the option to be turned into a current job
and
again copying the information but I am planning on using the same
technique.

I know it isnt the best idea to have duplicates of the same information
but
there are 3 stages to the jobs and all need to be saved seperatly and use
seperate IDs.

If the 'same information' is needed at three different stages, another
approach would be to store the "stage" instead.
Thanks for all your help

Jay


Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

evilcowstare via AccessMonster.com

Hi
The information will all be picked up from tables, the new customer will be
saved in its own table, I just wanted it to be picked up automatically by
another form without having to specifically select it. So as soon as the new
customer is saved you can click a button and it will open up the next form
with the customers info already entered.

This next form will also be saved into another table once additional
information has been entered.

How do I make it open up a form with information from the previous form
already entered?

For example you add a name "smith" into a customer record in Form1, you save
the record, you click a button, this opens up Form2 and displays "smith" at
the top.
In Form2 there is a save button which will save all the info from Form2 into
another seperate table.

Maybe this helps???

Thanks

Jeff said:
Jay

See comments in-line below...
Hello everyone, ok Im starting a new database which will involve several
forms, what I want to happen is that when a new customers details are
added
in a seperate customer form at the click of a button it will copy that
information into fields on another form.

Recall that Access tables store data, and Access forms display data. Even
though you might enter data on/in a form, the only way Access will
"remember" it is if the data is stored in a table.

So no, you won't need to copy the data from one form to another. You can,
however, have your second form look at the data (in its tables) that had
been entered via the first form.
I have looked about but cant find
what need, I have to use the control source so that the information is
[quoted text clipped - 4 lines]
on
its own without the prior ne customer form being used.

I don't understand what this ('table can also open') has to do with using a
form?
I hope this makes
sense.
[quoted text clipped - 11 lines]
there are 3 stages to the jobs and all need to be saved seperatly and use
seperate IDs.

If the 'same information' is needed at three different stages, another
approach would be to store the "stage" instead.
Thanks for all your help

Jay

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

The information will all be picked up from tables, the new customer will be
saved in its own table, I just wanted it to be picked up automatically by
another form without having to specifically select it. So as soon as the new
customer is saved you can click a button and it will open up the next form
with the customers info already entered.

This next form will also be saved into another table once additional
information has been entered.

This is A Very Bad Idea, in general.

Relational databases use the "Grandmother's Pantry Principle": "A place - ONE
place! - for everything, everything in its place". A name should be entered
once, and once only, into a table of People (or Customers, or Employees, or
whatever class of people you wish to represent). If you need to enter
additional information associated with a person, you can use a Query linking
the People table to some other table. Storing the name redundantly is simply
bad design! Just for one reason, think about name changes: if you store the
name only once, then the name need be changed only once to be reflected
everywhere it's needed. If you store the name in two or more tables, you WILL
- not may but will! - end up with the same person in your database under two
different names.

John W. Vinson [MVP]
 
J

Jeff Boyce

Again, you probably don't want "the customers info already entered" (but
perhaps I'm being to literal). The second form can look up existing
information, but you'll rarely have a need to have duplicate data in
multiple tables.

One way you could open a second form would be to use the OpenArgs property
to pass the ID (not the customer name) by using the DoCmd.OpenForm code
behind the button click. Check Access HELP on this command to see how to
pass a value. Then, in the to-be-opened form, you could have that form
restrict itself to the single record who's ID matches the OpenArgs value.

Regards

Jeff Boyce
Microsoft Office/Access MVP

evilcowstare via AccessMonster.com said:
Hi
The information will all be picked up from tables, the new customer will
be
saved in its own table, I just wanted it to be picked up automatically by
another form without having to specifically select it. So as soon as the
new
customer is saved you can click a button and it will open up the next form
with the customers info already entered.

This next form will also be saved into another table once additional
information has been entered.

How do I make it open up a form with information from the previous form
already entered?

For example you add a name "smith" into a customer record in Form1, you
save
the record, you click a button, this opens up Form2 and displays "smith"
at
the top.
In Form2 there is a save button which will save all the info from Form2
into
another seperate table.

Maybe this helps???

Thanks

Jeff said:
Jay

See comments in-line below...
Hello everyone, ok Im starting a new database which will involve several
forms, what I want to happen is that when a new customers details are
added
in a seperate customer form at the click of a button it will copy that
information into fields on another form.

Recall that Access tables store data, and Access forms display data. Even
though you might enter data on/in a form, the only way Access will
"remember" it is if the data is stored in a table.

So no, you won't need to copy the data from one form to another. You can,
however, have your second form look at the data (in its tables) that had
been entered via the first form.
I have looked about but cant find
what need, I have to use the control source so that the information is
[quoted text clipped - 4 lines]
on
its own without the prior ne customer form being used.

I don't understand what this ('table can also open') has to do with using
a
form?
I hope this makes
sense.
[quoted text clipped - 11 lines]
there are 3 stages to the jobs and all need to be saved seperatly and
use
seperate IDs.

If the 'same information' is needed at three different stages, another
approach would be to store the "stage" instead.
Thanks for all your help

Jay

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

evilcowstare via AccessMonster.com

Hi thanks,

The problem I have is that there are 2 main parts to the database, one is for
estimates another is for actual jobs....

Both of them need to have their own individual ID Autonumber. An estimate is
the first thing to happen (with its own id number) and then if thats ok it
then gets turned into a job with a seperate jobno ID.

Both of them need to link to the same customer, and both need to have a
seperate ID no as not all estimates go into jobs.

WHat is the best way to do something like this, any ideas?

Sorry this is the 1st time I have had to think about using two different sets
of IDs as main information



The information will all be picked up from tables, the new customer will be
saved in its own table, I just wanted it to be picked up automatically by
[quoted text clipped - 4 lines]
This next form will also be saved into another table once additional
information has been entered.

This is A Very Bad Idea, in general.

Relational databases use the "Grandmother's Pantry Principle": "A place - ONE
place! - for everything, everything in its place". A name should be entered
once, and once only, into a table of People (or Customers, or Employees, or
whatever class of people you wish to represent). If you need to enter
additional information associated with a person, you can use a Query linking
the People table to some other table. Storing the name redundantly is simply
bad design! Just for one reason, think about name changes: if you store the
name only once, then the name need be changed only once to be reflected
everywhere it's needed. If you store the name in two or more tables, you WILL
- not may but will! - end up with the same person in your database under two
different names.

John W. Vinson [MVP]
 
J

John W. Vinson

Hi thanks,

The problem I have is that there are 2 main parts to the database, one is for
estimates another is for actual jobs....

Both of them need to have their own individual ID Autonumber. An estimate is
the first thing to happen (with its own id number) and then if thats ok it
then gets turned into a job with a seperate jobno ID.

Both of them need to link to the same customer, and both need to have a
seperate ID no as not all estimates go into jobs.

WHat is the best way to do something like this, any ideas?

Sorry this is the 1st time I have had to think about using two different sets
of IDs as main information

A person is a person.

An estimate is a different kind of entity. An estimate is not a person, and a
person is not an estimate!

Might one person (over time) have TWO estimates, or maybe even THREE jobs?

I'd say you should have a table of Customers (containing all real and
potential customers), related one-to-many to a table of Estimates and to a
table of Jobs. Perhaps even better, if there is (as I would expect) a lot of
overlap between the data collected for an estimate and the data collected for
a job, you could just have *one* table of jobs, with a Yes/No field
distinguishing estimates from committed jobs.

Perhaps there is something I'm not seeing - but just the fact that not all
estimates become jobs does NOT imply to me that you need a separate ID!
Autonumber ID's are meaningless and arbitrary anyway; why would you need
separete tables, when a Query selecting a subset of the records could give you
the same information?

John W. Vinson [MVP]
 
E

evilcowstare via AccessMonster.com

Hi John,

Yes, you have basically described what I have so far 3 tables for customers,
estimates and jobs.
The reason I was looking to use 2 sets of autonumbers was that they need
seperate numbers for estimates and seperate for jobs, its just the way their
system is currently set up and they want to roll with it.

So with running from what they have the estimates will start at like number
2000 and the jobs at 1834.
So at the moment I have two tables for each.

How do I link the customer to the estimate so that when the new customers
details are entered I could get them to be displayed in another form as a
reference without having to select them again?


So you enter all the new details in one form ... name , address etc, then
when you want to put an estimate against the customer you can click a button
and the estimate form will come up with the name and address of the customer
at the top for reference for that estimate?

Sorry Ive never tried to do anythig like this before so im unsure how to make
it work, should I do like an OnClick>open
form>customerID=CustomerIDInEstimates would that work? And if I just opened
up the estimates form on its own would it have any issues looking for the
customers details, do I need to store the ID of the customer in the estimate
table so that it will remember it for later use i.e I go to estimate no 1222
and it picks up the customre information saved to it.

Thank you for all your help,. i hope this makes sence
John said:
Hi thanks,
[quoted text clipped - 12 lines]
Sorry this is the 1st time I have had to think about using two different sets
of IDs as main information

A person is a person.

An estimate is a different kind of entity. An estimate is not a person, and a
person is not an estimate!

Might one person (over time) have TWO estimates, or maybe even THREE jobs?

I'd say you should have a table of Customers (containing all real and
potential customers), related one-to-many to a table of Estimates and to a
table of Jobs. Perhaps even better, if there is (as I would expect) a lot of
overlap between the data collected for an estimate and the data collected for
a job, you could just have *one* table of jobs, with a Yes/No field
distinguishing estimates from committed jobs.

Perhaps there is something I'm not seeing - but just the fact that not all
estimates become jobs does NOT imply to me that you need a separate ID!
Autonumber ID's are meaningless and arbitrary anyway; why would you need
separete tables, when a Query selecting a subset of the records could give you
the same information?

John W. Vinson [MVP]
 
L

Larry Linson

I really hope this is a different question than you asked in "Automatic
drop-down selection?" which I answered, with code, before seeing that you'd
already had several responses here.

Larry Linson
Microsoft Access MVP
 
E

evilcowstare via AccessMonster.com

Yep it is, in this one I just wanted all the info copied over where with the
other I am looking for a drop down box to pick up on something else.
To me personally I see it as two different things, maybe thats just becuase I
dont know how to do either???

Thanks to everyone for your help

Larry said:
I really hope this is a different question than you asked in "Automatic
drop-down selection?" which I answered, with code, before seeing that you'd
already had several responses here.

Larry Linson
Microsoft Access MVP
Hello everyone, ok Im starting a new database which will involve several
forms, what I want to happen is that when a new customers details are
[quoted text clipped - 26 lines]
 

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

Top