Results 1 to 2 of 2
  1. #1
    Cheryl_Granieri is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    2

    Issue with seach fields in form

    Hi,

    I have a form with 3 search fields. When hit the "search" button after plugging in the values I want to query, I am getting a pop-up box requesting that I enter the parameter values that I want. -Forms!mainform!permitstate-
    Once I enter them, I the query runs correctly. I am not sure what I am missing with the connection of the query to the form. The query fields are linked to the form.

    This is the code I have when I run hit the 'seach' button.
    Private Sub cmdSearch_Click()

    Me.SubformBasedOnQuery.Requery

    Me.MaterialCode = ""


    Me.Permitstate = ""
    Me.RestrictedState = ""

    If IsNull(Me.SubformBasedOnQuery.Form!Material_Code) Then


    MsgBox "Material Code Not Found"


    End If



    End Sub

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try:

    Forms!mainform.permitstate

    Your form is actually named 'mainform'?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 12
    Last Post: 01-07-2013, 03:32 PM
  2. Form Seach Box-all attempts have failed.
    By leamas in forum Forms
    Replies: 12
    Last Post: 06-07-2012, 09:57 AM
  3. Replies: 0
    Last Post: 03-09-2012, 07:04 AM
  4. Form Issue (repetitive fields)
    By netchie in forum Access
    Replies: 2
    Last Post: 08-15-2011, 02:39 PM
  5. Seach table from within a form
    By 95DSM in forum Forms
    Replies: 5
    Last Post: 07-12-2010, 09:43 AM

Tags for this Thread

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