Open form with criteria from another form

Status
Not open for further replies.

purplecruz

New member
Local time
Today, 12:23
Joined
Apr 12, 2004
Messages
8
I have a database that people use to place orders. I have a switchboard that opens a new form each time the order button is clicked. If someone wants to edit their order, they open another form where they enter their name, the vendor name, and the date of the order. I would like a button on that form to open the order form with that criteria when clicked. This way they dont have to search through all the forms in order to find the one they want to edit. Any ideas?

Thanks, purplecruz
 
I used the where condition:
stDocName = "frmAcquisInfo"
DoCmd.OpenForm stDocName, (((tblEmpName.[Employee Name]) = Forms!frmedit!cboEmpName) And ((tblVendor.[Vendor Name]) = Forms!frmedit!cbovendor) And ((tblAcquisInfo.Date) = Forms!frmedit!txtDate))

When I click on the command button I get an "object required" message.

I also tried created a macro but when I try to run it I get a window asking for parameter values.

Any help would be greatly appreciated!

Thanks, purplecruz
 
Last edited:
I haven't looked any further than the fact that you apparently have a couple of ,, missing between the docname and the where clause. Check syntax

Brian
 
Yeah found the other thread, looks like we have somebody too damned idle to make any effort themselves.
If this sounds blunt even rude its meant to be, people are too busy to keep solving the same problems for the same person.

Brian
 
Anger management issues?

Yes, that is extremely rude. You should not assume things about people, and remember, there are people behind these threads and people have feelings. I have been working on this problem for a long time. I have searched the help menus and the other forums. I am new to using VBA and just couldn't get it to work. I did not mean to cause extra work for people. I thought my question would be answered better in the VBA section after I posted it in the form section. I will be sure to not do that again. Reading something like what you posted isn't the best way to start out a day. Thanks for that.

On another note,
Thankyou Pat Hartman for letting me know nicely and solving my problem.

purplecruz
 
purplecruz said:
I thought my question would be answered better in the VBA section after I posted it in the form section.

You, as a forum user and community member, have the ability to delete your own posts. Click on EDIT and you'll see the DELETE box. ;)
 
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom