Results 1 to 11 of 11
  1. #1
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22

    Conditional query form boxes

    I need some help on creating conditional combo boxes on a form that pulls from a query.

    What I need:
    Select: Year
    Select: Semester
    (based off of the two above selected, the one below needs to adjust to include only the information during that time period)


    Select: Internships

    If someone can help, please let me know and I can send you the file if you would like!

    Please Help!

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    If I understand correctly, you have two ways of going about it. The first, if your table does not consist of a huge amount of data would be the DLookup function. The second would be creating a query to the effect of SELECT Internships FROM tblName WHERE Year = Forms!formName!YearControlName AND Semester = Forms!formName!SemesterControlName

  3. #3
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22
    Quote Originally Posted by TheShabz View Post
    If I understand correctly, you have two ways of going about it. The first, if your table does not consist of a huge amount of data would be the DLookup function. The second would be creating a query to the effect of SELECT Internships FROM tblName WHERE Year = Forms!formName!YearControlName AND Semester = Forms!formName!SemesterControlName
    TheShabz, do you have anytime to help me through this? I am still unable to get it to work properly.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Go ahead and attach the db on here and I'll take a look.

  5. #5
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22
    I hope I have the relationships correct. If you have any questions I will be available all day.

    Okay so what I am looking for is:
    On the STUDENT form, I need to be able to select Internship 1 Semester (Spring, Summer, Fall)
    Then, select Internship 1 Year (2008-2020)
    Based upon these two selections, Internship 1 Name should be only populated with the internships available during that semester and year. (Coming from the table INTERNSHIPS) In the INTERNSHIPS form, you can select in CATEGORY either Field Experience or Internships. So for these I would only need the Internships to be available.

    The same would need to be done for Internship 2

    For the Field Experience area:
    The same would need to be done but show only "Field Experiences", not "Internships".


    Thanks so much for your help.

  6. #6
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I dont have Access here at home. Unless someone else can take a look, it'll have to wait til Monday when I get back to work.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Review tutorials at http://datapigtechnologies.com/AccessMain.htm especially the 3 on comboboxes in the Access Forms: Control Basics section.
    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.

  8. #8
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22
    This was very helpful and I think I am almost there. I have followed the steps in order to create the query and have created the event to requery. When I enter form view and try it out, on the last box after selecting semester and year it comes up and says

    "Enter Parameter Value" is the title of the dialog box
    Forms!Internships!internshipsemester
    (And then gives me an area to enter this parameter)

    Where did I go wrong?


    Thanks

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Because it is not finding anything with this name 'Forms!Internships!internshipsemester'. Should it be?: Forms!Internships!semester

    Your earlier post references Internship 1 Name. I don't see anything in your project with that name.

    Provide your revised project for analysis.
    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.

  10. #10
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22
    I was able to fix that. It looks like my only thing now is getting the combo box to requery. Do I create the event for semester, year, or the internship name?

  11. #11
    ThebigCt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    22
    Thanks so much for everyones help. I have figured it all out.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Conditional Combo Boxes on a form
    By ThebigCt in forum Access
    Replies: 1
    Last Post: 02-06-2012, 08:08 PM
  3. Conditional Update Query
    By TheShabz in forum Queries
    Replies: 6
    Last Post: 01-24-2012, 12:11 AM
  4. Conditional Query
    By thegladiator in forum Queries
    Replies: 1
    Last Post: 01-14-2011, 11:44 AM
  5. Conditional Query Question
    By Silver Rain 007 in forum Queries
    Replies: 0
    Last Post: 11-16-2009, 11:30 AM

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