Openning form

M

Mark

Hi,

I have created a database for purchase order. I have a
switchboard. On the the switchboard I have a button that
opens up my purchase order form. When the purchase order
form opens up it opens up on the first record. What I am
trying to do is for it to open up on a new record to be
entered eg it would be record 45 which is blank.

I would appreciate in someone can give me some guidance on
how to do this?

Thanks
 
F

fredg

Hi,

I have created a database for purchase order. I have a
switchboard. On the the switchboard I have a button that
opens up my purchase order form. When the purchase order
form opens up it opens up on the first record. What I am
trying to do is for it to open up on a new record to be
entered eg it would be record 45 which is blank.

I would appreciate in someone can give me some guidance on
how to do this?

Thanks

Do you want this form to always open to a new record, or just when it
is opened from the switchboard?

To always open to a new record, code the Form's Load event:
DoCmd.RunCommand acCmdRecordsGoToNew

To open to a new record only if opened from the switchboard,
Code the Switchboard command button click event:

DoCmd.OpenForm "FormName", , , , , , "GoToNew"

Code the Form's Load event:
If Me!OpenArgs = "GoToNew" Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
 

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

Top