Open form to blank record? (Access 2000)

BlueChicken

Usually Confused
Local time
Today, 11:20
Joined
Jun 19, 2009
Messages
88
Is there a way to have a form open to a blank record so that way you can skip the step of either going all the way to the end or hitting the [>*] button?

I still want to be able to access the other files but it would be easier to have it automatically upon opening go to the step that most people will be using the form for - data entry. We have reports set up for viewing and searching information.
 
In the form's On Load event (not the open event) put:

Code:
If Not Me.NewRecord Then
   Docmd.RunCommand acCmdRecordsGoToNew
End If
 
Put the following in the form's OnLoad event;

Code:
DoCmd.GoToRecord acDataForm,"YourFormName", acNewRec
 
Sorry for the long wait between replying. I had other priorities to take care of first before the end of the month.

So here is what happened:


In the form's On Load event (not the open event) put:

Code:
If Not Me.NewRecord Then
   Docmd.RunCommand acCmdRecordsGoToNew
End If
I tried this but no matter what I do, it always comes back with an error with the If Not Me.NewRecord highlighted.

Put the following in the form's OnLoad event;

Code:
DoCmd.GoToRecord acDataForm,"YourFormName", acNewRec
This doesn't work either.

What am I doing wrong?
 
This is what I have:

Code:
Private Sub Form_OnLoad()
    If Not Me.NewRecord Then
        DoCmd.RunCommand acCmdRecordsGoToNew
    End If
End Sub
 
Well, considering there is no OnLoad event - it is clear you typed it in. You should just select the Load event so Access populates the parts around it and then you put the code inside the sub declaration and the end sub.
 
Select the Load event so Access populates the parts around it and then you put the code inside the sub declaration and the end sub.

Where is it. I can not find the option for the "OnLoad" Event.
 
Where is it. I can not find the option for the "OnLoad" Event.

It isn't OnLoad it is just LOAD and if you open the form in design view, go to the properties dialog and then to the Events tab, you can find it in the list, make sure it says [Event Procedure] and then click the Ellipsis (...) that appears when you click in and it will take you right to it.
 
Go into the form Properties. Click the tab that says "Events". Click on the On Load field, then click the button with the three dots. Select Code Builder.
 
if you ONLY want to enter new data, just set the forms DATAENTRY property to TRUE

then you cant see existing data - it just enables input of new data
 
Hey Guys,
I am trying the same thing only in Access 97 but there's no option for LOAD in the Ellipses(....) as boblarson mentioned in the thread Can u pls tell me wat I need to do for Access 97
thanx
Leeza
 
With the form in design view click in the small box in the top left hand corner of the form it lies at the intersection of the horizontal and vertical rulers a smaller black square will appear which indicates that you are dealing with form events, know click on the events tabs, in the properties list. the On Load (appears in the VBA window simply as Form_Load() ) event is twelfth down the list (in Access '03 at any rate).
 
I found the on Load option in the properties but it doesn't have the option u r talkin abt tht's why I'm confused
 
I see the On Load potion in the event menu but there's no option as Form_Load()
wat do I do now???
 
I see the On Load potion in the event menu but there's no option as Form_Load()
wat do I do now???

load01.png


load02.png


load03.png
 
I did the procedure but its giving me an error saying tht either the database is a read-only or its not converted from the older version so the
DoCmd.RunCommand acCmdClearAll method
is not working
any suggestions pls??????]
 
never has it been truer that; A picture paints a thousand words :)

At Bob ^^^^^^
 
Last edited:

Users who are viewing this thread

Back
Top Bottom