Display blank record in bound form on load

  • Thread starter Thread starter Jason Lindsay
  • Start date Start date
J

Jason Lindsay

I'm trying to get my bound form to load with an empty
record when the form is first loaded. Using the
recorsetclone and bookmark function do not work, and
initializing the form controls to Null on load blanks out
all data in my record of the bound table.

I want to keep my form bound to the table, but I want the
form to display empty when it is first loaded. I'm
assuming it has something to do with creating a UNION
query for my form's recordsource with Null, but get an SQL
error everytime I try to code the form like that.
 
Normally, opening to a "blank" record means opening to a new record. Is that
what you're after?
assuming it has something to do with creating a UNION
query for my form's recordsource with Null

I didn't understand this part, is the RecordSource a Union query? If so,
it's not updateable and you won't be able to get a new record. At what point
do you want records to show in the form?
 
I want to keep my form bound to the table, but I want the
form to display empty when it is first loaded.

Two ways to do this:

- Set the Data Entry property of the form to True. This will let you
add new records (but will prohibit viewing old ones).

- Put code in the Form's Load event:

Private Sub Form_Load(Cancel as Integer)
DoCmd.GoToRecord acNewRecord
End Sub
 
Back
Top