Results 1 to 7 of 7
  1. #1
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33

    Applyfilter in a subform

    Dear Access experts,
    I have textboxes where I would like to insert texts and filter the records shown in the form as per this texts. Just beside each textboxs I have put some "filter buttons"; they should filter the records by taking the text from the textboxes.


    For example, there's the textbox "employee" where I put the ID number of the employee, and beside there's the "Employee filter" button.
    What happens is that I apply the macro "applyfilter" to the button, taking as reference the corresponding textbox, but everytime I click on it appears a message box "enter parameter value", where I have to insert the parameter of the filter (for example, 5 for the ID employee).
    I would like that the user could simply click on the filter button and filter the records without this message box..

    Please, do you have any idea?? I'm really stuck on this..

    Beppe

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Should be fairly simple to do using vba code but I seldom if ever use macros
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Like Bob I don't use macros, but that parameter prompt is Access telling you it can't find something. Double check your spelling and the syntax used to refer to the textbox. Post it here if you still have trouble.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    Thanks!
    Maybe I try in the other section of this forum, because I think it is a programming issue

  5. #5
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    Changed my mind..it is ok that shows this window "insert parameter"

    How do I make that by inserting for example "bov", all the record that starts with "bov" are shown? I mean for example records with "bova", "bovb", "bovc",...

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think the syntax is different in a macro, something like:

    FieldName Like Forms!FormName.TextboxName & "*"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Beppe is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    33
    I solved the problem with the code at: https://www.accessforums.net/showthread.php?t=68242

    Thank you!
    Beppe

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

Similar Threads

  1. FilterByForm Macro then ApplyFilter
    By dscottf in forum Macros
    Replies: 1
    Last Post: 10-28-2015, 04:58 AM
  2. Replies: 15
    Last Post: 10-02-2015, 12:07 PM
  3. ApplyFilter in ACCDR
    By Cedarguy in forum Access
    Replies: 5
    Last Post: 05-11-2015, 05:49 AM
  4. Help with ApplyFilter
    By kabichan in forum Programming
    Replies: 1
    Last Post: 01-15-2010, 09:21 PM
  5. Using ApplyFilter in Form...help please
    By playfuljade in forum Forms
    Replies: 8
    Last Post: 12-19-2005, 09:35 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