Moving information from a previous record to current record

M

Mark M S

I am using version 2002. I thought this would be easy but my every attempt
results in a halt error for my Macro.

I have a subform that contains about 10 text or memo fields that represent
the content of one patient visit.

When I create a new record (visit) in the subform I would like to easily
copy
information from the previous record into the current new record. (It will
represent the detains of the visit from the prevous day.) I could
just highlight it then copy and paste, but thought that a command button
driving a macro would be easiest and fastest for my physician users. I
suspect that I would need a button for each record because not all the
records will be filled in each day.

Can I do that with a macro? Any hints apprecited.
Thanks.


--
*************************************************
Mark M Simonian MD FAAP

****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
K

Ken Sheridan

Mark:

In code the Click event procedure for a button would be:

RunCommand acCmdSelectRecord
RunCommand acCmdCopy
RunCommand acCmdPasteAppend

I don't normally use macros, but I'm sure you'd have no trouble calling the
above three commands with a macro. It will copy the currently selected
record and paste it as a new record.

Ken Sheridan
Stafford, England
 
M

Mark M S

Dear Ken, Thank you for your time answering.

I found another way to solve the problem just now after reading something
online.

I created an append query that looked at a "selected" record field. I
indicated the date()-1 for the previous day in the currentDate field.

In the macro i used OpenQuery to the append query. I then followed with a
Requery. I deselected the CurrentDate and CurrentTime field so that could be
updated to the current date and time after the macro ran. I then created a
command button and attached the macro to the Click event.

It seems to be working. This gives me a copy and paste for all the text and
memo fields for the previous day and then the doctors can add any additional
comments.
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 

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