Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't keep form from opening on new record

Status
Not open for further replies.

dpimental

Programmer
Jul 23, 2002
535
US
I have a "tabbed" form that originally was set to open on new record; but I have since changed that property.

But it still is opening on a new record, even though I am specifying ...
Code:
DoCmd.OpenForm "TabOrder",,,"orderno = 12"

David Pimental
(US, Oh)
 
What is the value of the DataEntry property of this form ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The DataEntry Value is Yes.

Should it be no?

David Pimental
(US, Oh)
 
The DataEntry Value is Yes
So, only new record ...
 
I changed it to no, here is what happened.

If I open it on its own, it starts on the first record, which is what I expect.

But, I am trying to oepn it from another form and it still is opening on a new record.

This form adds a new record, and I have a different form to edit additional information.

David Pimental
(US, Oh)
 
Check the DoCmd.OpenForm line that opens that form.

perhaps that line includes acFromAdd, forcing it to open in DataEntry mode
 
Have you checked that OrderNo 12 exists?
 
I'd try this just before calling OpenForm:
DoCmd.RunCommand acCmdSaveRecord

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top