Blank Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to open a form with all the fields blank. At the moment it shws
the first record each time.
How do i do it?
 
Open the form in design view and set Data Entry property to Yes. It will
always open to a new (empty) record. You can not view records with this
form.
 
Where do I find the data entry property?

KARL DEWEY said:
Open the form in design view and set Data Entry property to Yes. It will
always open to a new (empty) record. You can not view records with this
form.
 
David said:
Where do I find the data entry property?

In design view do a right click on the top left square. Properties will
be on the list.
 
this is on forms that i am bringing up information on. As soon as I do that i
cant see that information
 
If you wanted to still see the info and bring up a blank one when you
load, you could always just set the form to go to addnew when it loads.
to do this just simply add this line to the Form_Open event:

On Error Resume Next
DoCmd.GoToRecord , , acNewRec

This will open up the form and it will be on a new record (i.e. all
blanks) and all of your other information will still be viewable. Or
if you wanted to still go the dataentry route, you could add a command
button to your form that allows the user to turn the dataentry property
on and off by the following code:

Sub Command1_Click()
If bool = True Then
Command1.Caption = "Data Entry Off"
bool = False
Me.DataEntry = True
ElseIf bool = False Then
Command1.Caption = "Data Entry On"
bool = True
Me.DataEntry = False
End If
End Sub

This requires you to declare a public boolean variable and set it to
true on the form_load event. if you do not know how to do this just
ask. This may provide an advantage over the newrecord option because
when you set the dataentry property to false it will be at the
beginning of your recordset whereas with the new record you will be at
the end. There may be other more elegant ways, but these two ways will
work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top