Results 1 to 5 of 5
  1. #1
    dukenukem is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2011
    Posts
    2

    PLEASE HELP...deadline at work and stumped!


    Hey guys...

    I am pretty good with Excel VBA but not so much with Access VBA. I may not even need VBA for this but i basically have a Form that i have set up which needs to pull data from a query i have set up in Access. All the tables and the query are good to go..that is not the issue.

    The issue is that i cant seem to be able to search a query for a loan ID then have all the fields in the Form i have set up populate with the appropriate data. I have figured out how to run the query with a command button based on an ID i enter that then pulls up the actual query results in a table view...but i dont want that. The user would not understand that view. I need the results to be pulled into the Form i have created. Do i need VBA for this or is there another way.. Thanks!!!
    Have to have this done by monday so would appreciate any help!!!

    Duke

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Make the record source for the form your query. With your form open in design view, click on properties, then Data and select your query for your record source. Filter as necessary.

  3. #3
    dukenukem is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2011
    Posts
    2
    Thanks Alan...

    I have all the records I want to pull linked to the query liked you described above.

    My issue is on the filter. When i type in the ID i want to search by do i need a command button to rerun the query each time i enter a new ID?

    Right now in the query...I have in the ID field a criteria linking to the Form to only SELECT WHERE ID = ID in the form. I think that is what i need to do.

    My problem is that in the Form the only thing i have figured out how to do is put a command button that runs the query based on the ID i enter and shows me the results in a table view...and not populating the fields in the form. I would like to run the query based on the ID i put in and not have the query results pop up in the table view...rather just populate the fields in my Form. Lemme know if that makes sense.

    thanks again!

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Along with what Alan has provided, watch this free video tutorial on search
    http://www.datapigtechnologies.com/f...earchform.html

  5. #5
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I think that you may wish to use a custom filter instead of a search form from what I gather from your posting. Look at this video on a custom search using the query as your record source.

    http://www.datapigtechnologies.com/f...tomfilter.html

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

Similar Threads

  1. Replies: 6
    Last Post: 07-17-2011, 06:42 PM
  2. Really stumped newbie here
    By alwittlich in forum Access
    Replies: 5
    Last Post: 05-18-2011, 11:55 AM
  3. Should be simple query but I'm stumped
    By hvacfixer in forum Queries
    Replies: 9
    Last Post: 10-09-2010, 10:05 PM
  4. Stumped! Counting query based on 2 different tables
    By TheWolfster in forum Queries
    Replies: 7
    Last Post: 09-10-2010, 01:10 PM
  5. Stumped on an INSERT
    By Elisa in forum Programming
    Replies: 1
    Last Post: 12-26-2009, 10:49 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