Group: microsoft.public.access
From: "azu_daioh@yahoo.com"
Date: Tuesday, October 16, 2007 5:52 PM
Subject: Re: Help pls - error on code and I dont know how to fix :)

Thanks John. I thought I responded to this earlier when I found out
the solution. I hope it didnt get posted someplace else. :)

You were right, i realized I was setting ctlName twice and did a
search in the forum and found the correct syntax when referencing a
form using string expression. Here's the code I finally got to work:

Set frmCurrentForm = Screen.ActiveForm
frmName = frmCurrentForm.Name
sfrmName = "sfrm_" & frmName & "_NotesOnly"

frmCurrentForm.Controls(sfrmName).Form.Controls("LogEntry") =
yNotes _
& vbCrLf & vbCrLf &
frmCurrentForm.Controls(sfrmName).Form.Controls("LogEntry")