T
Tal
While I am certain that this has been addressed before, I am having serious
trouble parsing out my code.
I have a command button on a form that I am trying to set to open another
form with a value from the first form.
The code for the button is:
Private Sub btnEditFund_Click()
Dim MyArgs As String
MyArgs = [keyFunds] = " & Me.cboSelectFund.Value"
DoCmd.OpenForm "frmEditFunds", , , MyArgs
End Sub
The OnLoad code for the frmEditFunds is:
Private Sub Form_Load()
Dim MyArgs As String
If Not IsNull(Me.OpenArgs) Then
Me.cboFund = Forms!frmAddDonation!cboSelectFund
If IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
End If
End Sub
First the form was opening empty but now I am getting the following error
message:
"Block If without End If" and the debugger is opened.
Many many thanks,
Talia
trouble parsing out my code.
I have a command button on a form that I am trying to set to open another
form with a value from the first form.
The code for the button is:
Private Sub btnEditFund_Click()
Dim MyArgs As String
MyArgs = [keyFunds] = " & Me.cboSelectFund.Value"
DoCmd.OpenForm "frmEditFunds", , , MyArgs
End Sub
The OnLoad code for the frmEditFunds is:
Private Sub Form_Load()
Dim MyArgs As String
If Not IsNull(Me.OpenArgs) Then
Me.cboFund = Forms!frmAddDonation!cboSelectFund
If IsNull(Me.OpenArgs) Then
DoCmd.GoToRecord , , acNewRec
End If
End Sub
First the form was opening empty but now I am getting the following error
message:
"Block If without End If" and the debugger is opened.
Many many thanks,
Talia