D
DS
This was working fine untill I changed the form and table to a variable.(
frm As Form.tbl As DAO.TableDef.) Now I'm getting an Argument Not Optional
message. Any help appreciated.
Thanks DS
Public Function NOEX(frm As Form, tbl As DAO.TableDef) 'Item Totals No
Discounts
NOEX = Round(Nz(DSum("(CDQuantity*CDPrice)", "tbl.NAME", "CDCheckID = " &
frm!TxtCheckID.Value & "AND CDDiscountDP = 0"), 0), 2)
End Function
Public Function DOLNEX(frm As Form, tbl As DAO.TableDef) 'Item Totals With
Dollar Discounts No Tax
DOLNEX = Round(Nz(DSum("(CDQuantity*CDPrice)+CDDiscountAmount", "tbl.NAME",
"CDCheckID = " & frm!TxtCheckID.Value & " " & _
"AND CDDiscountDP = 1 AND CDDiscountWhere ='A' AND CDKillTax = -1"), 0), 2)
End Function
Public Function SUBEX() As Currency
SUBEX = NOEX() + DOLNEX()
End Function
frm As Form.tbl As DAO.TableDef.) Now I'm getting an Argument Not Optional
message. Any help appreciated.
Thanks DS
Public Function NOEX(frm As Form, tbl As DAO.TableDef) 'Item Totals No
Discounts
NOEX = Round(Nz(DSum("(CDQuantity*CDPrice)", "tbl.NAME", "CDCheckID = " &
frm!TxtCheckID.Value & "AND CDDiscountDP = 0"), 0), 2)
End Function
Public Function DOLNEX(frm As Form, tbl As DAO.TableDef) 'Item Totals With
Dollar Discounts No Tax
DOLNEX = Round(Nz(DSum("(CDQuantity*CDPrice)+CDDiscountAmount", "tbl.NAME",
"CDCheckID = " & frm!TxtCheckID.Value & " " & _
"AND CDDiscountDP = 1 AND CDDiscountWhere ='A' AND CDKillTax = -1"), 0), 2)
End Function
Public Function SUBEX() As Currency
SUBEX = NOEX() + DOLNEX()
End Function