Form GoToRecord acNEw Error

M

Mike Thomas

In Access 2003, I have a function to copy the contents of the current record
into a new record. I do this as per the code below. The problem is in the
line DoCmd.GoToRecord , , acNew. The error message states "You can't go to
the specified record".

When I comment out the preceeding lines, that is, I don't memorize the
values in the texboxes, it wokrks fine.

Does anyone know what is causing this error?


strBrand = Me.cboBrand
strModel = Me.txtModel
strSerial = Me.txtSerial
strItem = Me.cboItem

strInvNbr = Me.txtInvNbr
dtDateIn = Me.txtDateIn
strCost = Me.txtCost
dtDateIn = Me.txtDateIn

boolFloorPlan = Me.ckFloorPlan
dtDateMat = Me.txtMaturity
dtDatePaid = Me.txtPaidDate
strCheck = Me.txtCheck

DoCmd.GoToRecord , , acNew

If Not IsNull(strBrand) Then
Me.cboBrand = strBrand
End If


Many thanks
Mike Thomas
 
Top