I am sure this has been asked a thousand times, but I couldn't seem to find a thread.
I have a form, which contains a subform. When in the subform, I have a button to create a new main form and I want it to prefill in the data from some fields on the subform.
It looks like it should work, but #1, when I am in the main form inside the subform, the botton does nothing. If I open only the subform, then it at least works.
And #2, it definitely captures the values that I want, but it doesn't fill them in on the form.
Here is my code:
Private Sub Command44_Click()
On Error GoTo Err_Command44_Click
Dim doc As String
Static tit As String
Static desc As String
doc = "Business Requirement Document"
title = IssueType
desc = Issue
DoCmd.OpenForm doc, acNormal, , , acFormAdd
BRD_Title = title
BRD_Description = desc
Exit_Command44_Click:
Exit Sub
Err_Command44_Click:
MsgBox Err.Description
Resume Exit_Command44_Click
End Sub
Any help would be MUCH appreciated!!
I have a form, which contains a subform. When in the subform, I have a button to create a new main form and I want it to prefill in the data from some fields on the subform.
It looks like it should work, but #1, when I am in the main form inside the subform, the botton does nothing. If I open only the subform, then it at least works.
And #2, it definitely captures the values that I want, but it doesn't fill them in on the form.
Here is my code:
Private Sub Command44_Click()
On Error GoTo Err_Command44_Click
Dim doc As String
Static tit As String
Static desc As String
doc = "Business Requirement Document"
title = IssueType
desc = Issue
DoCmd.OpenForm doc, acNormal, , , acFormAdd
BRD_Title = title
BRD_Description = desc
Exit_Command44_Click:
Exit Sub
Err_Command44_Click:
MsgBox Err.Description
Resume Exit_Command44_Click
End Sub
Any help would be MUCH appreciated!!