On Jun 3, 11:31 am, Salad <o...@vinegar.comwrote:
Quote:
troy_...@comcast.net wrote:
Quote:
Let's say I have a template form named Form1. I have two text fields
named Month and Year.
|
>
Quote:
|
Using an event procedure from another form, I want to:
|
>
Quote:
1) Open the template form
2) Name the form based on the concatenated entries of the two text
fields
3) Save the form and leave it open
|
>>>
I have a difficult time understanding your situation. Do you open a
form, enter data into two fields, and then expect to rename itself to
something contained in its textboxes? I don't see how one can rename a
form that it open. Do you?
>
I'll offer a couple of pointers.
Rename an object
DoCmd.Rename "MyNewFormName", acForm, "MyOldFormName"
Copy an existing object
DoCmd.CopyObject, "MyNewFormName"", acFrom, "MyOldFormName"
>
My Rarotongahttp://www.youtube.com/watch?v=lNQ1Arc9Nik
|
For anyone with a similar issue, here is the code I came up with. It
works well. This is coming from what I call the initiation form. This
collects a few key pieces of information. A template form is copied
and renamed to the variable strTitle.
Private Sub cmdCreateScorecard_Click()
Dim strTitle As String
strTitle = Me!cboSelectMonth & " " & Me!txtEnterYear
DoCmd.CopyObject , strTitle, acForm, "Copy of
frmSummaryScorecardTemplate"
DoCmd.OpenForm strTitle, , , , acFormEdit
End Sub