Results 1 to 2 of 2
  1. #1
    Zerdan is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2011
    Posts
    15

    Changing Forms with Search

    I just started using Access yesterday (I come from Rails/PHP but client wants Access) so I apologize for what I am assuming is a very basic question. I have worked out how to search and filter results as long as the search boxes are on the same form as the displaying data.

    I'm dealing with a database with ~800k entries, so loading it and then filtering isn't ideal. I'd rather bring up the search criteria first, have those entered and then when "Submit" is clicked have it switch forms (This is the part I can't figure out).



    This tutorial was helpful, but it is for reports and I haven't been able to adapt it to forms properly: http://allenbrowne.com/casu-08.html Any advice would be greatly appreciated.

    Thank you.

  2. #2
    Zerdan is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2011
    Posts
    15
    I figured it out with the following code:

    Dim strForm As String
    Dim strWhere As String

    strForm = "Runs" (This is the name of the form I wanted open after hitting "search")
    strWhere = (This is where logic for the query goes)

    DoCmd.OpenForm strForm, , , strWhere

    Thanks!

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

Similar Threads

  1. Globally changing colors on forms
    By pwdpwd in forum Programming
    Replies: 2
    Last Post: 11-23-2010, 09:06 PM
  2. Changing information display method in forms
    By mrbaggins in forum Forms
    Replies: 5
    Last Post: 10-21-2010, 06:00 AM
  3. Search function in forms
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 03-14-2010, 06:17 PM
  4. Replies: 0
    Last Post: 03-17-2009, 11:25 AM
  5. Replies: 2
    Last Post: 11-09-2005, 02:51 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