Results 1 to 3 of 3
  1. #1
    RigoraNocels is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2018
    Posts
    1

    Enter Parameter Value Query

    Hi,
    I am creating a database to run maintenance checks on the equipment we have installed and I have a query that is filtered by a date specified by the user, obviously this creates a parameter value dialog box which is fine.

    However when I move to the form and open it asks for the date twice.



    I have a macro which runs an append query creating rows in another table when the form is updated. I have it against the After Update event. This query also has a filter on the date... is this likely to be causing the second parameter value dialog box? If so, is there a way I can get around this?

    I am running Access 2007.

    Many thanks

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    normally when opening a form, you have the form provide the parameters - either on opening as a parameter of the docmd.openform method or as an unbound textbox on a form to apply a filter or requery the form once opened.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    you can do away with the param query and the macro.
    on a continuous form that shows all records, user enters a date, and it filters the records.:

    Code:
    sub txtBox_Afterupdate()
    If IsNull(txtBox) Then
      Me.FilterOn = False
    Else
      Me.Filter = "[MyDate]=#" & txtBox & "#"
      Me.FilterOn = True
    End If
    end sub

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

Similar Threads

  1. Replies: 5
    Last Post: 08-09-2017, 01:16 AM
  2. Update Query - Enter Parameter Value
    By Evans2 in forum Queries
    Replies: 2
    Last Post: 05-10-2015, 12:22 AM
  3. Replies: 3
    Last Post: 10-23-2014, 04:22 PM
  4. ComboBox to Run Query and enter Parameter
    By tristangemus in forum Forms
    Replies: 13
    Last Post: 06-25-2013, 09:54 AM
  5. Replies: 13
    Last Post: 01-10-2012, 09:56 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