Pasting a continuing note with Setvalue not working

M

Mark M S

Thank you. I was using the form # as a simple decription. The actual control
is ProgressNote for form #1 (frnMain) and Note for form #2 (frmNote). When I
use this in a Setvalue macro Item is [Forms]![frmMain]![ProgressNote]
progress note is a memo field,

and Expression [Forms]![frmNote]![Visit] & " " & [Forms]![frmNote]![Notes]
where Visit is a date field and Notes is a memo field

Whatever I put in the frmNote overwrites the frmMain ProgressNote

I must not be entering all the correct information in the expression
builder. Let me try again.
*************************************************
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.
Steve Schapel said:
Mark,

If I understand you correctly, I think you need something like this...
[Progress Note #1] & Chr(10) & Chr(13) & [Note Form #2]

Just as a side comment... it is not a good idea to use a # as part of
the name of a field or control or database object.

--
Steve Schapel, Microsoft Access MVP

I am using a form date and text field to create a note on the Note Form #2
then using setvalue to paste it to the Progress Note #1 memo field of
another form. It works well but I need to open the Note form each day and
create a new note and add it to the Progress note. I did this a long time
ago and it seems that I did a carriage return (Chr$) in the first note and
it forced a return and printed on the following line. I can't figure out the
syntax now so I can keep adding notes to the first form. Any suggestions are
appreciated.
-----------------------------------------------------
Mark M Simonian MD
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
****************************************
 
S

Steve Schapel

Mark,

As I understand it, then, your Expression needs to be...
[Forms]![frmMain]![ProgressNote] & Chr(13) & Chr(10) &
[Forms]![frmNote]![Visit] & " " & [Forms]![frmNote]![Notes]

If the macro is being activated from an event on one of the forms in
question, you don't actually need the Forms! syntax, e.g. if the macro
is triggered on frmMain, Expression is...
[ProgressNote] & Chr(13) & Chr(10) & [Forms]![frmNote]![Visit] & " " &
[Forms]![frmNote]![Notes]
 
M

Mark M S

It works great now. Thanks so much. In the area where there is a space a
box character shows up instead of a blank space. Is there something besides
chr(10) to use for a space?
*************************************************
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.
Steve Schapel said:
Mark,

As I understand it, then, your Expression needs to be...
[Forms]![frmMain]![ProgressNote] & Chr(13) & Chr(10) &
[Forms]![frmNote]![Visit] & " " & [Forms]![frmNote]![Notes]

If the macro is being activated from an event on one of the forms in
question, you don't actually need the Forms! syntax, e.g. if the macro
is triggered on frmMain, Expression is...
[ProgressNote] & Chr(13) & Chr(10) & [Forms]![frmNote]![Visit] & " " &
[Forms]![frmNote]![Notes]

--
Steve Schapel, Microsoft Access MVP

Thank you. I was using the form # as a simple decription. The actual control
is ProgressNote for form #1 (frnMain) and Note for form #2 (frmNote). When I
use this in a Setvalue macro Item is [Forms]![frmMain]![ProgressNote]
progress note is a memo field,

and Expression [Forms]![frmNote]![Visit] & " " & [Forms]![frmNote]![Notes]
where Visit is a date field and Notes is a memo field

Whatever I put in the frmNote overwrites the frmMain ProgressNote

I must not be entering all the correct information in the expression
builder. Let me try again.
*************************************************
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
****************************************
 

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