L
LJG
I have an option box on a form, which has a print report button, When I run
the report I want the chosen value of various fields to be added to the
report, trouble I am having is adding the code to choose the value I need.
My sample code is below:
Private Sub Report_Open(Cancel As Integer)
With CodeContextObject
If (.Forms![frmEditQuote]![optPayType] = 1) Then
Me.txtDeposit = Forms![frmEditQuote]![txt3yrdepTotal]
If (.Forms![frmEditQuote]![optPayType] = 2) Then
Me.txtDeposit = Forms![frmEditQuote]![txt5yrdepTotal]
End If
End If
End With
End Sub
Anyone help please ?
Les
the report I want the chosen value of various fields to be added to the
report, trouble I am having is adding the code to choose the value I need.
My sample code is below:
Private Sub Report_Open(Cancel As Integer)
With CodeContextObject
If (.Forms![frmEditQuote]![optPayType] = 1) Then
Me.txtDeposit = Forms![frmEditQuote]![txt3yrdepTotal]
If (.Forms![frmEditQuote]![optPayType] = 2) Then
Me.txtDeposit = Forms![frmEditQuote]![txt5yrdepTotal]
End If
End If
End With
End Sub
Anyone help please ?
Les