Results 1 to 13 of 13
  1. #1
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57

    Red face stop subform from populating before combo box on main form is selected

    I have two forms, the first form selects a town, this is used to filter the second form combo box with the names of people from the selected town, the second form has a subform, when the combo box is selected shows what cloths these people have.


    what is happening is that before a name is selected in the second form combo box the subform is being populated with data.
    what I want to happen is for the subform not to be populated until a name is selected from the second form combo box
    Peter

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you tried not setting the RecordSource of the SubForm until the AfterUpdate event of the second form ComboBox?

  3. #3
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    RuralGuy,
    Thank you for your reply, being new at this is it possible to explain how i do that.
    Peter

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  5. #5
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    thank for that
    Peter

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Let us know if you are successful.

  7. #7
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    it will be a week before i can get the time, and i will let you know, thanks for the help
    Peter

  8. #8
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    RuralGuy,
    I have played around with the information that you gave me and yes I can now say that it works. Many thanks with your help.
    Peter

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Thanks for posting back with your success.

  10. #10
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    the only problem in the end that i had was that it left the fields with an error in the fields of the subform #name? so i created a query with the same field names and put a nul value " " in the criteria of the fields then when I opened the form these field were clear, just how i wanted it, once again many many thanks I have been trying to find a solution for some time.
    Peter

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you set the DataEntry property True then the form will *only* display New records (which are initially blank). That might work better for you. Set the SubForm to locked and disabled until you are ready for the user to use it so it looks normal.

  12. #12
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    great i will try that thanks, that is for tommorrow

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You would not have to leave the RecordSource blank with that method.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-10-2011, 06:33 PM
  2. Replies: 3
    Last Post: 04-04-2011, 02:45 PM
  3. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  4. Replies: 1
    Last Post: 10-13-2010, 12:40 PM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 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