Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 January 29th, 2007, 03:41 PM
Friend of Wrox
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default Referencing another field and more

Maybe there is a simple solution in what I am trying to do.


I have 3 Tables I am using:

Table 1:

MFGID-Primary key
Address etc

Table 2: Parts
PartNumber-Primary Key

Table 3: Order Details (No Key)
(other details)

Problem #1
I am trying to make a form that can filter Parts by manufacturer. I have over 5k in parts among 7 manufacturers. I want to be able to have the MFGID ComboBox be the filter for the parts that are listed in the Part# Combobox while still autopopulating the "Description" and "Price".

Problem #2
How can I make it so that the field searches for items as they Type?

Problem #3
I want to be able to make it so that when they assign an order on one form the next form they open will have the order number already autopopulated in it-


The user creates a quote. Quotes can have multiple orders. The user orders the parts but wants to adjust some of the information related to it located in Table 3. In order to adjust that information they need to pull up a different form than the Order Form. Since they had the Order form up I placed a command button to open the form to adjust the related information.

I want the new form to auto populate the order number from the first form.

I hope someone can help me. Sorry i am very new to Access so explain it to me simply.


Old January 30th, 2007, 09:28 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

Okay, here is what you do:

Create a combo box using the wizard to look up the MFGID, Manufacturer in Table 1. Hide the PK column, unless your users use the MFGID number to look up the Man.

Then create a combo box to look up the PartNumer, Description, and MFGID. Hide the PK field, and the MFGID field as well.

Then open the query designer on the second combo box, and add this criteria to the MFGID field:


Then on the After Update event of the first combo box, add this code:


This will do the first part and synchronize the combo boxes. Then on the On Current event of the form, put this code:


This will set the first one to the current record, and synchronize the second. When you scroll to a new record, they should go back to their start state. See if this throws an error.

This should take care of the first part.


Similar Threads
Thread Thread Starter Forum Replies Last Post
referencing html... Jayahar ASP.NET 3.5 Basics 1 September 2nd, 2008 10:41 PM
Referencing new node in IE roccosiffredi Ajax 2 May 4th, 2007 03:30 AM
Referencing a subform scandalous Access 2 March 16th, 2007 07:05 AM
Referencing a field from the current recordset PeterGonzales Access VBA 2 January 5th, 2006 01:45 AM
Referencing an object from within a procedure mike123abc Beginning VB 6 5 February 3rd, 2004 02:51 PM

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