Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53

    Parameter query with DropBox through Form

    Hi.

    So i am trying to make a Form where I insert a field (Say The Developer) through a drop box and then hit a button which will open up a query and show me the the Records with that developer.


    How do i do this lol!



    Ive seen some stuff on the internet, but none of them are really clear on how to actually do it. i know in the query im supposed to put the parameter as [field]![form]![dropBox] or something like that.

    thats as far as i got, i dont know what to do in the form to make this work.



    thank you for any help.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,062
    You could start with a blank form.
    Now what do you need to do???
    This is what you said
    Code:
    You said you wanted 
          to hit a button
                 which will open up a query and 
                     show the records related to that developer
    This what you will need, based on what you said
    So you need a button with a Click event
    which will open a query
    that will Select records related to some developer???


    Which developer??? Where will that info come from??? A dropbox... which dropbox?

    What will be in the drop box?? Where will that data come from??

    I think that's a bit of help to get you started.

    Update/edit: I see Alan posted while I was typing.

  4. #4
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Alright, so I watched the video, and it helped, but I stil have one problem.

    When i run the Form, in the drop box i select a Developer, and I hit the Run Query button and the query pops up and shows me what I want, all the jobs with that developer. Now, when i try to change the developer on the form and hit the Run query button again, Nothing happens!

    Why????

    Can anyone help me!

  5. #5
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505
    Did you remember to put a Me.Requery in the afterupdate event of the combobox?

  6. #6
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Yes, I did remember, it still doesnt work. Any other ideas???

  7. #7
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505
    Will probably need to see your db in order to diagnose. Suggest you upload with limited and non confidential data. To maximize viewers who can assist, suggest you save as a AC 2003 .mdb file. Run a compact and repair before zipping.

  8. #8
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Will do, One problem though, the confidential information... I am trying to delete it, but it wont let me delete it! basically i have three fields with confidential information and they are shared (Relationship) Between two tables..

    How do i get rid of those fields without ruining the database?

    Funny that I run into problems because im trying to fix problems haha.

  9. #9
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505
    Copy your data base into a new database and try to just change the data to something that is not confidential instead of trying to remove the fields. Removing the fields will probably corrupt the db.

  10. #10
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    BackUp4.zip
    Okay, I only left 4 records to make my life easier.

    I also noticed there is something wrong with my other Query (Sort By Unit) Because it stopped working for some reason when i removed most of the records and changed the names of the remaining few.

    Any help would be much appreciated..

    thank you

  11. #11
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505
    Sorry, I cannot read your file at work. I will have to wait until I get home as I only have AC2003 here.

  12. #12
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Alright. Thanks for your help!

  13. #13
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,505
    I can't be sure, but I think the issue has to do with table normalization. You should not have two identical tables. I understand why you did it, but it is contrary to relational database design. You should not be segregating your data by mechanical and electrical. Those should be fields in your database. I think it would help to read this white paper on database design and re-evaluate how you have your db set up. It will save a lot of heartache down the road.

    I would have separate tables for contractors, developers and projects

    http://www.deeptraining.com/litwin/d...aseDesign.aspx

  14. #14
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Great, I need to rethink everything I thought i knew about Databases
    Thank you for your help.

    But im still confused, what do you mean by seperating tables for contractors, developers and projects? how would that work?
    I am looking at the link as well, but if you can give me some feedback it will make understanding databases easier

  15. #15
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    also, this is only the start! I plan on putting electrical/mechanical contracts for Hospitals, two condo types, aparments est. So this database is gonna get complicated.

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

Similar Threads

  1. Opening form with parameter query
    By Lowell in forum Forms
    Replies: 5
    Last Post: 04-01-2012, 04:46 PM
  2. dropbox might be changing relationships
    By Glghshbrz in forum Database Design
    Replies: 8
    Last Post: 03-15-2012, 03:15 AM
  3. Use form control value as parameter for query
    By jpkeller55 in forum Access
    Replies: 2
    Last Post: 02-07-2012, 06:09 PM
  4. Form with parameter query subform
    By shiphtfour in forum Forms
    Replies: 11
    Last Post: 12-29-2010, 06:43 PM
  5. Pass a Parameter From a form to a Query
    By DDillesha in forum Forms
    Replies: 1
    Last Post: 10-28-2009, 12:49 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