duplicating data to a different table

  • Thread starter ielmrani via AccessMonster.com
  • Start date
I

ielmrani via AccessMonster.com

Hi,
Has anybody done this before, if so please help. thanks in advance.
I have a form to enter date and note (we'll call it form1) linked to table1.
I am trying duplicate the record that I enter in form1 to different table
(table2). Is it possible?
 
G

Gina Whipp

ielmrani,

Okay I am still unclear why you would need a seperate table for that? Just
set the form for Allow Additions = Yes and Continuous and then they just add
the new note to the end and still review previous notes.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
I

ielmrani via AccessMonster.com

I don't think I was clear of what I was looking for. This is what I am
trying to do:

I have a form for users to enter clients data (name, address, phone, etc..)
one of the data that they need to enter is: Status date, Follow up date and
Note.
As an example, for client1 one of the users entered a status date, follow up
date and note. let say 2 months later another user has an update on client1,
so he needs to enter new status date, follow up date and note. Instead of
erasing the first status date, follow up date and note we want to save it and
put the new one in its place. so when we go to client1 record we see the most
resent dates and note while they other dates and notes are saved. This way we
have a history note

Thanks

Gina said:
ielmrani,

Okay I am still unclear why you would need a seperate table for that? Just
set the form for Allow Additions = Yes and Continuous and then they just add
the new note to the end and still review previous notes.
They have a column for note and date. they want to be able to put a new
date
[quoted text clipped - 12 lines]
 
B

Bob Quintal

I don't think I was clear of what I was looking for. This is what
I am trying to do:

I have a form for users to enter clients data (name, address,
phone, etc..) one of the data that they need to enter is: Status
date, Follow up date and Note.
As an example, for client1 one of the users entered a status date,
follow up date and note. let say 2 months later another user has
an update on client1, so he needs to enter new status date, follow
up date and note. Instead of erasing the first status date, follow
up date and note we want to save it and put the new one in its
place. so when we go to client1 record we see the most resent
dates and note while they other dates and notes are saved. This
way we have a history note

Thanks

Gina said:
ielmrani,

Okay I am still unclear why you would need a seperate table for
that? Just set the form for Allow Additions = Yes and Continuous
and then they just add the new note to the end and still review
previous notes.
They have a column for note and date. they want to be able to
put a new date
[quoted text clipped - 12 lines]
table
(table2). Is it possible?

What you need to do is remove the [Status date], [Follow up date] and
[Note] fields from your main table.

Entries of those three columns are made in the 'history' table which
contains those 3 columns plus the Client_ID associatd with the main
table's record. The history table should be shown as a subform to the
main form used to show the client information. If you sort the
subform to show the most recent data first, you get the same effect
as you want, but without the problems you are encountering about
moving data. from table to table.
 
G

Gina Whipp

In addition to what Bob said, I think you have set-up your database in a
flat file format (like an Excel Spreadsheet). Using Access like this
greatly diminishes the functionality of a relational database AND you will
run into problems like the one you are having now. You might benefit from
reading/reviewing the below links...

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials


http://www.databasedev.co.uk/table-of-contents.html

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Bob Quintal said:
I don't think I was clear of what I was looking for. This is what
I am trying to do:

I have a form for users to enter clients data (name, address,
phone, etc..) one of the data that they need to enter is: Status
date, Follow up date and Note.
As an example, for client1 one of the users entered a status date,
follow up date and note. let say 2 months later another user has
an update on client1, so he needs to enter new status date, follow
up date and note. Instead of erasing the first status date, follow
up date and note we want to save it and put the new one in its
place. so when we go to client1 record we see the most resent
dates and note while they other dates and notes are saved. This
way we have a history note

Thanks

Gina said:
ielmrani,

Okay I am still unclear why you would need a seperate table for
that? Just set the form for Allow Additions = Yes and Continuous
and then they just add the new note to the end and still review
previous notes.

They have a column for note and date. they want to be able to
put a new date
[quoted text clipped - 12 lines]
table
(table2). Is it possible?

What you need to do is remove the [Status date], [Follow up date] and
[Note] fields from your main table.

Entries of those three columns are made in the 'history' table which
contains those 3 columns plus the Client_ID associatd with the main
table's record. The history table should be shown as a subform to the
main form used to show the client information. If you sort the
subform to show the most recent data first, you get the same effect
as you want, but without the problems you are encountering about
moving data. from table to table.
 
I

ielmrani via AccessMonster.com

Thank you all for you suggestions. I'll let you know how it goes.

Gina said:
In addition to what Bob said, I think you have set-up your database in a
flat file format (like an Excel Spreadsheet). Using Access like this
greatly diminishes the functionality of a relational database AND you will
run into problems like the one you are having now. You might benefit from
reading/reviewing the below links...

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

http://www.databasedev.co.uk/table-of-contents.html
[quoted text clipped - 36 lines]
as you want, but without the problems you are encountering about
moving data. from table to table.
 
I

ielmrani via AccessMonster.com

Hi,
I found a code that I changed a little bit and it works. It's duplicating
the data in another table. It's perfect. Maybe you'll use it one day.
Thanks for all your help.


Private Sub Status_AfterUpdate()
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("JHC Note")
MyRs.AddNew
MyRs!ID = Forms![JHC Status1]!ID
MyRs!StatusDate = Forms![JHC Status1]!StatusDate
MyRs!Followupdate = Forms![JHC Status1]!Followupdate
MyRs!Status = Forms![JHC Status1]!Status

MyRs.Update
strCode = DMax("[ID]", "JHC Note")

Me.Refresh
End Sub
Thank you all for you suggestions. I'll let you know how it goes.
In addition to what Bob said, I think you have set-up your database in a
flat file format (like an Excel Spreadsheet). Using Access like this
[quoted text clipped - 21 lines]
 
B

Bob Quintal

Hi,
I found a code that I changed a little bit and it works. It's
duplicating the data in another table. It's perfect. Maybe
you'll use it one day. Thanks for all your help.

No, neither Gina or I do things that violate the accumulated wisdom
of database designers since the 1950s, to fix design problems that
are easy to fix. As time goes on, you will discover many other
problems with your design that will only be more difficult to fix,
Thank you all for you suggestions. I'll let you know how it
goes.
In addition to what Bob said, I think you have set-up your
database in a flat file format (like an Excel Spreadsheet).
Using Access like this
[quoted text clipped - 21 lines]
as you want, but without the problems you are encountering
about moving data. from table to table.
 

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