Dear Friends
I am buiding a form to print cheques. In my office, we use 2 currency; USDollar and MMK(Local Currency). Because the size of the 2 cheques are different, I have created 2 reports. In my form, I also have a field for these2 currency.
In clicking the Print button, the print preview of the cheque will be display the MMKCheque or USDCheque depend on the value in the currency. I have filtered the record to be the current one. The following code is the one I have try.
thanks for your help in advanced.
I am buiding a form to print cheques. In my office, we use 2 currency; USDollar and MMK(Local Currency). Because the size of the 2 cheques are different, I have created 2 reports. In my form, I also have a field for these2 currency.
In clicking the Print button, the print preview of the cheque will be display the MMKCheque or USDCheque depend on the value in the currency. I have filtered the record to be the current one. The following code is the one I have try.
thanks for your help in advanced.

Code:
Private Sub PrintCheque_Click()
On Error GoTo Err_cmdPrintLabel_Click
Dim Cheque As String
Dim Currencys As String
If Currencys = "MMK" Then
Cheque = "MMKCheques"
Else
Cheque = "USDCheques"
End If
DoCmd.OpenReport Cheque, acPreview, , "[ID] like '" & Me![ID] & "'"
Exit_cmdPrintLabel_Click:
Exit Sub
Err_cmdPrintLabel_Click:
MsgBox Err.Description
Resume Exit_cmdPrintLabel_Click
End Sub