D
Dave Elliott
I need to enter the code below this line into the code below it, where and
how do I do this ?
The idea is to not allow the Invoice to be saved of course without a
Customer, etc...
IsNull([Customer ID]) MsgBox "You Must Choose a Customer"
on Error GoTo Err_Command450_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Order ID]= Forms![Categories and Products]![Order
ID]"
stDocName = "InvoiceReport"
' Write Order Amount to 'Orders' Table (Total Due)
Forms![Categories and Products]!Field201 = Forms![Categories and
Products]![Total Due]
' Store as Invoice verses Quote
Forms![Categories and Products]!Type = "Invoice"
' Mark invoice as 'Due'
Forms![Categories and Products]!Status = "Due"
Forms![Categories and Products]!pr1 = Forms![Categories and
Products]!Price
Forms![Categories and Products]!pr2 = Forms![Categories and
Products]![Price 2]
Forms![Categories and Products]!pr3 = Forms![Categories and
Products]![Price 3]
Forms![Categories and Products]!pr4 = Forms![Categories and
Products]![Price 4]
Forms![Categories and Products]!pr5 = Forms![Categories and
Products]![Price 5]
Forms![Categories and Products]!pr6 = Forms![Categories and
Products]![Price 6]
Forms![Categories and Products]!pr7 = Forms![Categories and
Products]![Price 7]
Forms![Categories and Products]!pr8 = Forms![Categories and
Products]![Price 8]
Forms![Categories and Products]!pr9 = Forms![Categories and
Products]![Price 9]
Forms![Categories and Products]!pr10 = Forms![Categories and
Products]![Price 10]
Forms![Categories and Products]!pr11 = Forms![Categories and
Products]![Price 11]
Forms![Categories and Products]!pr12 = Forms![Categories and
Products]![Price 12]
Forms![Categories and Products]!pr13 = Forms![Categories and
Products]![Price 13]
Forms![Categories and Products]!pr14 = Forms![Categories and
Products]![Price 14]
Forms![Categories and Products]!pr15 = Forms![Categories and
Products]![Price 15]
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria
Exit_Command450_Click:
Exit Sub
how do I do this ?
The idea is to not allow the Invoice to be saved of course without a
Customer, etc...
IsNull([Customer ID]) MsgBox "You Must Choose a Customer"
on Error GoTo Err_Command450_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Order ID]= Forms![Categories and Products]![Order
ID]"
stDocName = "InvoiceReport"
' Write Order Amount to 'Orders' Table (Total Due)
Forms![Categories and Products]!Field201 = Forms![Categories and
Products]![Total Due]
' Store as Invoice verses Quote
Forms![Categories and Products]!Type = "Invoice"
' Mark invoice as 'Due'
Forms![Categories and Products]!Status = "Due"
Forms![Categories and Products]!pr1 = Forms![Categories and
Products]!Price
Forms![Categories and Products]!pr2 = Forms![Categories and
Products]![Price 2]
Forms![Categories and Products]!pr3 = Forms![Categories and
Products]![Price 3]
Forms![Categories and Products]!pr4 = Forms![Categories and
Products]![Price 4]
Forms![Categories and Products]!pr5 = Forms![Categories and
Products]![Price 5]
Forms![Categories and Products]!pr6 = Forms![Categories and
Products]![Price 6]
Forms![Categories and Products]!pr7 = Forms![Categories and
Products]![Price 7]
Forms![Categories and Products]!pr8 = Forms![Categories and
Products]![Price 8]
Forms![Categories and Products]!pr9 = Forms![Categories and
Products]![Price 9]
Forms![Categories and Products]!pr10 = Forms![Categories and
Products]![Price 10]
Forms![Categories and Products]!pr11 = Forms![Categories and
Products]![Price 11]
Forms![Categories and Products]!pr12 = Forms![Categories and
Products]![Price 12]
Forms![Categories and Products]!pr13 = Forms![Categories and
Products]![Price 13]
Forms![Categories and Products]!pr14 = Forms![Categories and
Products]![Price 14]
Forms![Categories and Products]!pr15 = Forms![Categories and
Products]![Price 15]
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria
Exit_Command450_Click:
Exit Sub