Can a form tell another form to add a record?

E

Edo2008

I'd like to have a button on a formA which:
1) Opens another form (formB) and creates a new entry in the table
FormB is pointing to.


I know how to open the form... and one option is to pass formB an
argument telling it to create a new record.
Ideall, I could access a subroutine in FormB from FormA....


Is this possible?

Thanks
-Ed
 
J

Jeff Boyce

You've described "how", as in how you are trying to accomplish something.

It isn't clear yet "what", as in what business need you will be able to
solve by doing this.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

Edo2008

I'd like to have a button on FormA which says: "Create a new order".
So I'd like it to bringup up the order form (FormB) ready and pointing
to a blank entry (new).


-Ed
 
J

Jeff Boyce

You are still describing "how" you want to do something, but maybe you are
trying to add a new order record in your application?

The "how" will really depend on how your data is organized. Please provide
a bit more description of your table structure...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
L

Larry Linson

Edo2008 said:
I'd like to have a button on FormA which says: "Create a new order".
So I'd like it to bringup up the order form (FormB) ready and pointing
to a blank entry (new).

If all you want is to open a form for data entry, the button wizard will
generate the code for that... you may have to go in and change the
DoCmd.OpenForm to open on a blank Record for data entry, but there's good
help on the arguments for DoCmd.OpenForm. Yes, you _CAN_ do it, even if
"you don't write VBA code" . . . the wizard creates the code, and all you
have to do is modify it.

If you have a little VBA background, you can pass other information that you
may need... using the WhereCondition or Filter arguments to do some
selection...

Larry Linson
Microsoft Office Access MVP
 

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