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 February 8th, 2007, 12:30 AM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jd_erd Send a message via AIM to jd_erd Send a message via MSN to jd_erd Send a message via Yahoo to jd_erd
Default filtering records on subform from an unbound combo

I would greatly appreciate some help on this problem

I have main form that is unbound and has information loaded into it from a dataset and then a filter is applied to to a combo box. Anyways when I select an item from the unbound combo box I want it to filter a sub form that is bound to a query and displayed in datasheet view.

example: when I select a recipe number from the combo box it filters the subform to that recipe.

cborecipe: 2 cake

subform recipe
Recipe Number Ingredients Quantity
      2 Eggs 2
      2 Flour 4
      2 Milk 5
      2 Sugar 2


Thanks any help would be appreciated

jd erd
__________________
jd erd
 
Old February 8th, 2007, 08:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

This is an interesting issue. I might add criteria to the query like this:

Recipe Number:
[Forms]![frmYourMainForm].[cboRecipe]

See if that works. It may not since when the form opens, no recipe is selected. A kludge would be to create a blank recipe with Recipe Number 0, and then make that the default selection on the combo box.

Is that working?

mmcdonal
 
Old February 8th, 2007, 07:47 PM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jd_erd Send a message via AIM to jd_erd Send a message via MSN to jd_erd Send a message via Yahoo to jd_erd
Default

I was thinking as for now just making the sub form invisible until a recipe is selected from the combo box and the second problem I have is when the recipe is selected I want it to be editable on the sub form

jd erd
 
Old February 12th, 2007, 11:21 PM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jd_erd Send a message via AIM to jd_erd Send a message via MSN to jd_erd Send a message via Yahoo to jd_erd
Default

I tried your suggestion but my problem is it is not allowing me to add items to the recipe from the product table such as for example butter. I want to be able to add items to the recipe from a products table by using a combo box in the recipe table.

jd erd





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unbound combo box / listbox problem VBM2 Pro Visual Basic 2005 3 March 13th, 2007 11:04 AM
unbound field in subform chacquard Access VBA 4 February 7th, 2007 10:01 AM
Linking an unbound subform probitaille Access VBA 1 September 13th, 2006 12:27 PM
Options in unbound combo box not saving? Badjoojoojen Access 17 April 2nd, 2005 05:14 PM
Filtering Subform Problem sherr8 Access 4 May 19th, 2004 10:22 AM





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