Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 29th, 2007, 03:41 PM
Friend of Wrox
 
Join Date: Jan 2007
Location: , , .
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.

Background:

I have 3 Tables I am using:

Table 1:

MFGID-Primary key
Manufacturer
Address etc

Table 2: Parts
MFGID
PartNumber-Primary Key
Description
Price

Table 3: Order Details (No Key)
OrderNumber
PartNumber
(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-

Scenario

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.

Thanks!!

Reply With Quote
  #2 (permalink)  
Old January 30th, 2007, 09:28 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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:

[Forms]![frmYourFormName].[cboMFGID]

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

Me.cboPartNumber.Requery

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

Me.cboMFGID = Me.MFGID
Me.cboPartNumber.Requery

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.

mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:30 AM.


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