Openning form

  • Thread starter Thread starter Mark
  • Start date Start date
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
 
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
 
Back
Top