New Record On Open

  • Thread starter Thread starter k8jones
  • Start date Start date
K

k8jones

I have read just about every entry on this site and have figured out how to
get to the OnOpen function in my database.

When I look at the properties of the form, I dont see any "OnOpen" event
listed. And I also can't seem to find anything on the "Data Entry" (where you
would put yes for the data entry property)

What am I missing? I can't find out where to put this code at all!

I would like it so that when users opened the form, it would go to a new
record, but would still be able to view preivious records to edit them.

Would it make a difference that I have the database open directly to that
form?

And another thing? at the bottom of the form, it lists the number of the
record, but that doesnt correcpons with the table that it is linked to? Any
ideas why?

THANK YOU!
 
Make sure that you are looking at the Form properties and not one of
your controls or header/footer/detail section properties.

If you have the Form open in Design View double click anywhere on the
form and properties window should open up. Make sure that "Form"
appears in the drop down in the top left-hand corner. Select the "All"
tab. There you should find both "On Open" and "Data Entry" I think
"Data Entry" is the 14th row and "On Open" is much further down.

Once you have located "On Open" click in the empty field next to the
event name. A little command button with "..." will appear to the right
of the field. Click and choose "Code builder". The Editor should open
up to the Sub Form_Event Event handler. That is where you put your
code.

This is not the only way to get there. As with most things there are
101 different ways to get the same result. HTH.
 
Thanks HTH!

But when I double click any where on the form in design view, I get the
properties for the detail/heardr/footer, etc.

What is another way to view the form Properties?
 
You should be able to select "Form" from the dropbown box in the upper
left hand corner of the window. Another way is to open the form in
design view and select "View" and then "Properties" from the File Menu.
 
Thanks HTH!

But when I double click any where on the form in design view, I get the
properties for the detail/heardr/footer, etc.

What is another way to view the form Properties?
Don't click 'on' the form, click in the little square where the top
ruler and left ruler meet. Then either press F4, or click View +
Properties, or right-click properties.
 
I went about this a different way.

To open the form properties there is a little empty square in the upper
left corner of the form. When clicked, a smaller black square will
appear. Right click this square and choose properties.

In my form properties I made a Macro for the OnOpen event...

The action was "GoToRecord" and then in the properties down below in
the record slot I chose New. This way users can open to a new record
and then push the back button and view other records.

Annemarie
 
Back
Top