Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    clean32 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Jun 2011
    Posts
    51

    sub forms & combo boxs

    HI



    i have a form with 2 combo boxs on it, and nothing else

    i need a sub form to filter its records off the values in the 2 combo boxs.

    i even tried the wizzard i keep on getting not embeded.

    doint want to use a filter becouse the subform is where the data will be enterd

    cheers

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    I don't understand your comment 'i even tried the wizzard i keep on getting not embeded'.

    Check out these tutorials:
    http://datapigtechnologies.com/flash...tomfilter.html
    http://datapigtechnologies.com/flash...earchform.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    Quote Originally Posted by June7 View Post
    I don't understand your comment 'i even tried the wizzard i keep on getting not embeded'.

    Check out these tutorials:
    http://datapigtechnologies.com/flash...tomfilter.html
    http://datapigtechnologies.com/flash...earchform.html
    thanks for that, but i dont want a filter, i would prefer to link the sub form as the subform will also need to have data put into it. if i use a filter, that will dispay but will not update the ID fields if i put in a new record

    so main form
    combo box 1 from a table and combo box 2 from another table.

    the sub form is based on a 3rd tale that also has the same fields as the first 2 tables.

    in access one, i would just have entered the table and fields into the link child link master. but that appears not to be possible in access 2003.

    i would welcome any other suggestions. if i have to use a filter then i would have to build another form for DE

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Hi clean32

    I think that you can do this.
    Let's call the PK's from the first and second tables PK1 and PK2.
    In table 3 you have FK's with these names.

    Set both the subform control properties called "Link Child Fields" and the "Link To Master Fields" to PK1;PK2
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    thats what i used to do in 1 1.1
    but in 2003 i get this

    new form combo boxs. click the subform on tool box, use existing form.

    link child fields i click the ... and get this

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Once you have the subform on the main form, just type "PK1;PK2" (without the quotes) in both the subform control properties called "Link Child Fields" and the "Link To Master Fields".
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    Quote Originally Posted by Bob Fitz View Post
    Once you have the subform on the main form, just type "PK1;PK2" (without the quotes) in both the subform control properties called "Link Child Fields" and the "Link To Master Fields".
    but thay are combo boxs

    so combo0;combo2 master
    area;plant type child

    i cant use the .... to do it so typing in in manually is ok.

    But it seems that it cant see combo boxs. for some reason.

    when i open the form it asks for a value for both area and plant type

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    so combo0;combo2 master
    area;plant type child
    This looks wrong to me.

    If the names of the combo boxes you are using are "combo0" and "combo2" then the property settings should be:

    combo0;combo2 for master
    combo0;combo2 for child

    please try this and post back with results.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #9
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    ok done that, no luck

    no filter defect and the area and plant on the sub form is not picking up the data from the combos when entering new record

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Strange that this is not working.
    I have tried this solution and it is working for me.
    Is the bound column of each combo box the first column and is it holding the PK of the of the data it displays?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    Quote Originally Posted by Bob Fitz View Post
    Strange that this is not working.
    I have tried this solution and it is working for me.
    Is the bound column of each combo box the first column and is it holding the PK of the of the data it displays?
    the two combo boxs have only one column each. though i doint i understand bound. the form is a blank one. each combo box gets its data from its own table.

    i doint understand how your method can ID to the two fields in the sub form, "area" and "plant type". if i put "area" and "plant type" in the child field i get the from asking for value when i open it do do any thing with it.

  12. #12
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Can you post the SQL of both combo boxes and the SQL of the subform please.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  13. #13
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    Quote Originally Posted by Bob Fitz View Post
    Can you post the SQL of both combo boxes and the SQL of the subform please.
    sure, no problem
    one question, how do you do that, i cant see the SQL thing in 2003

  14. #14
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    For each of the combo boxes:
    Cut and paste the text that is showing in the "Row Source" property

    For the subform:
    Take a look at the "Record Source" property.
    If the text starts with "SELECT....." then .
    If it is just showing the name of the table:
    Click the three little dots ... on the right.
    This will open the Query Builder.
    In the Query Builder, double click each of the fields listed in the table so that all the fields are in the query and then close it.
    The "Record Source" property will now start with "Select...."
    Cut and paste this.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  15. #15
    clean32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    51
    SELECT [Plant type].[Plant type] FROM [Plant type] ORDER BY [Plant type];
    SELECT Area.Area FROM Area;

    SELECT Item.Item, Item.area, Item.[plant type], Item.[commision date], Item.[supplyer codes], Item.statis, Item.notes, Item.Date FROM Item;

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  2. Combo Box Filtering between Forms
    By andrew_ww in forum Access
    Replies: 3
    Last Post: 12-30-2009, 11:06 PM
  3. cascading combo boxes on Continuous Forms
    By Jerry8989 in forum Forms
    Replies: 0
    Last Post: 10-12-2009, 10:02 AM
  4. Replies: 4
    Last Post: 04-01-2009, 08:49 PM
  5. Working with Two Combo boxs
    By Della Smith in forum Database Design
    Replies: 2
    Last Post: 08-01-2008, 02:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums