New Record question

  • Thread starter Thread starter Ayo
  • Start date Start date
A

Ayo

DoCmd.Close acForm, "Invoice Database Launch", acSaveYes
DoCmd.OpenForm "Invoice Tracker New Entry", acNormal
Application.Forms("Invoice Tracker New Entry").Caption = "CREATE INVOICE"
DoCmd.GoToRecord , , acNewRec

When I use the above code. It creates a blank record in the datasheet. Is
there a way to delete the record if it is blank and keep the record if there
are data in it?
 
There is always a new, empty record at the end of a datasheet unless you
have set AllowNewRecords to False, or your query is not updateable.
 
Thanks Arvin.
So, how would I delete empty records from the database using code when the
form closes. I would like to delete any blank records that are created in the
datasheet when the form used to add records to the datasheet is closed.
 
Thanks Arvin. I found another post on here that kinda show me how to do what
I needed to do, using DoCmd.RunCommand.
 
Back
Top