copy data between forms automatically

W

weircolin

Hi

Does anyone know if it is possible for data to be copied to a form
automatically when it is opened by a button on a form?

Cheers

Colin
 
R

Rick B

Well, the data is stored in a table. If you want to see some of that on
another form, include that table as part of your data source.

You would NOT want to store the data twice. That is redundant and breaks
database normalization rules.

For example, if you have an employee form and a button to open a "historical
earnings form". Your only link (duplicate data in both) would be the
employee number. You can DISPLAY the employee's name, phone number,
department, etc. in both forms, but you would not store that data in more
than one table.
 
W

weircolin

Hi

Thanks for your reply. The data I am wanting to copy across will be
saved on two seperate tables, would it still be possible?

Cheers

Colin
 
R

Rick B

You don't store data in two separate table in a relational database (with a
few very rare exceptions).

What type of data are we talking about, and why would you want it in two
places? What if the data changes (typo?) and you have to fix it? You would
now have two or more places to fix it.

There is not an EASY way to do this because it is typically not correct.
Post some details and we can help you out.
 
W

weircolin

It is a charity I work for and we represent unpaid carers and take
their problems forward on their behalf. Basically I have two tables,
one of them is for contact details for the carer and the other table I
am using is to store the issues that are raised by carers. As some of
the issues are anonymous I can't put them next to a name on the main
database so therefore I have created a table just for this information.


The information that is the same between the tables is Name, Surname
and Reference Number.

Thanks

Colin
 
R

Rick B

I would think that you would simply use the Ref# as a link when you needed
the data.

I'm afraid I still don't see the data structure.

What are the fields in each table?

If you have...


TblIssues
IssueRefNumber
IssueDescription
IssueDate
IssueType
IssueResolution
IssueResolutionDate
etc.

TblCareGivers
CarerNumber
CarerFirstName
CarerSurName

TblCarerIssues
CarerNumber
IssueRefNumber



The issues are all stored in the first table (ONE record per issue).

Each caregiver has one record in the second table.

The third table is used to link each issue to the care giver.

When you need to list only the issue (and not indicate who the caregiver
was) then simply report on the Issue table. You can include the
CarerNumber, or not! You could even include the CarerNumber in your report,
sort and group by it, but not print the actual number. This would allow you
to group all the issues together by carer, but not identify which carer it
was.

I believe the above structure would be proper for your application. It also
follows database normilization rules.
 
W

weircolin

Hi Rick

Thanks for your reply. I'm thinking its not going to be too straight
forward so I will maybe give it a try later, working on some other
things at the moment.

Its not any hassle to type the Reference Number and Name in when
there's a new issue for a person, think I'm just looking for cream on
it!

Thanks again

Colin
 
Top