Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2004, 02:27 PM
Authorized User
 
Join Date: Nov 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening a Form based on two Values

Hello,

I am building an Order Entry system that tracks orders for brokers and the contacts that work for the broker. The contact form is a subform of the broker form.

Currently, the Order Entry form opens correctly for the broker using the macro with the where clause: "[numAccountID]=[Forms]![frmCompanyAccount]![numAccountID]".

I would also like the order entry from to open to the correct contact. The contact field would be:{numContactID} = [Forms]![frmCompanyAccount![CompanyContact]![numContractID].

My question is how do I make the order entry form open up to the correct broker and contact. The order entry form has the two fields numAccountID and numContactID.

Thanks



 
Old May 10th, 2004, 03:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Use the AND operator:

[numAccountID] = Forms.[frmCompanyAccount].Form.[numAccountID] AND [numContactID] = Forms.[frmCompanyAccount].Form.[numContractID]


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
copy columns based on cell values EricB123 Excel VBA 0 December 18th, 2007 12:51 AM
Grouping based on attributes values Chamkaur XSLT 4 June 21st, 2006 05:51 AM
Rules based on attribute values... jacob XML 2 July 6th, 2005 01:50 PM
Opening recordset based on stored procedure misterqj Access 2 March 17th, 2005 10:09 PM
how to show 2 different values based on date maria Crystal Reports 1 August 4th, 2004 08:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.