"Bob Vance" wrote in message
> Part of my code for Distributing Invoices is to give Invoice numbers, What
> I am trying to do is give a zero to a Invoice that check box
> [ckHoldingInvoice] = True
> -------------------------------------------------
> If (SubForm)subAdditionChargeChild (Checkbox)ckHoldingInvoice is True Then
> InvoiceNo =0 Else
> -----------------------------------------------
> Part of my Code below!
> Private Sub subSetInvoiceValues()
> lngInvoiceNo = DMax("InvoiceNo", "tblInvoice") + 1
>
>
> If lngIntermediateID > lngItMdt Then
> .AddNew
AddNew to what? In order to AddNew, you need a recordset to add it to.
Additionally, you need a With/End With construct to use AddNew the way you
show it. Sometimes you need the entire relevant code rather than a tiny
snippet.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com