Will_J
10-03-2013, 10:15 AM
Hi Guys & Girls,
Thanks in advance for your help.
I presently have this problem. I have a reminders form that Opens from a variety of different forms, for arguments sake let's say Production and Meeting both have a button with an OnClick events then leads to the following line of code;
DoCmd.OpenForm "frmEmail", , , , acFormAdd, , Me.[ProductionID]
DoCmd.OpenForm "frmEmail", , , , acFormAdd, , Me.[MeetingID]
The problem occurs when I have the
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
Me.[ProductionID] = Me.OpenArgs
End If
End Sub
I want the OpenArgs to be variable to allow for the correct ID to be dropped in the relevant combo box. I have tried;
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
Me.[ProductionID] = Me.OpenArgs
Me.[MeetingID] = Me.OpenArgs
End If
End Sub
Addmitedlty, the logic dosen't work forme I would have to write another statement however I've spent to long dumbfounded and was hoping you guys & girls could give me a little help.
Many Thanks,
Will
Thanks in advance for your help.
I presently have this problem. I have a reminders form that Opens from a variety of different forms, for arguments sake let's say Production and Meeting both have a button with an OnClick events then leads to the following line of code;
DoCmd.OpenForm "frmEmail", , , , acFormAdd, , Me.[ProductionID]
DoCmd.OpenForm "frmEmail", , , , acFormAdd, , Me.[MeetingID]
The problem occurs when I have the
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
Me.[ProductionID] = Me.OpenArgs
End If
End Sub
I want the OpenArgs to be variable to allow for the correct ID to be dropped in the relevant combo box. I have tried;
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
Me.[ProductionID] = Me.OpenArgs
Me.[MeetingID] = Me.OpenArgs
End If
End Sub
Addmitedlty, the logic dosen't work forme I would have to write another statement however I've spent to long dumbfounded and was hoping you guys & girls could give me a little help.
Many Thanks,
Will