Results 1 to 4 of 4
  1. #1
    jmharris is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    3

    apply filter macro not working in subform after I've changed where condition for filtering to email

    I use a apply filter macro with where condition [ID]=[Forms]![Main Form]![ID] which for me translates....[ID]=[Forms]![Request for Purchase]![ID]
    When I move the form to navigation the macro stops working. I have tried many different combos in the macro for use of subforms in main form...i.e.
    [ID]=[Forms]![Ops Navigation Form]![NavigationSubform].[Form]![ID]
    [ID]=[Forms]![Ops Navigation Form].[Form]![ID]
    [ID]=[Forms]![Ops Navigation Form].[Form]![NavigationSubform]![ID]


    [Forms]![Ops Navigation Form]![NavigationSubform].[Form]![ID]
    [Forms]![Ops Navigation Form]![NavigationSubform].[Form]![request for Purchase]![ID]
    and so on. And error comes up every time that there is no data base availible for the filter. The email object macro works fine without the filter but then it ends up emailing the whole set of forms (continuous).
    The form "request for purchase" is based on a table with info on it. I have placed that form along with a few other forms similar work order forms in a navigation form. I don't really know VBA but can copy and past really well if I know what names to change.
    Can someone tell me what the where condition needs to be for filtering to the current subform or create a current form pdf to email?

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well aspects of your post are not clear; one can control a form's display of information at 2 different points; the record set (i.e. query that it is based on) or a filter

    a sub form, if it is bound to the main form is going to be defined by that cross referenced field

  3. #3
    jmharris is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    3
    Quote Originally Posted by NTC View Post
    well aspects of your post are not clear; one can control a form's display of information at 2 different points; the record set (i.e. query that it is based on) or a filter

    a sub form, if it is bound to the main form is going to be defined by that cross referenced field
    -I don't have a query. It is a filter of a subform bound to the main form I imagine. The code works fine when used just in the main form (filter form macro then email database object "form"). But I don't know how to define it all in the subform.

  4. #4
    jmharris is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Posts
    3
    I don't know if it helps but here is a picture of the form...Click image for larger version. 

Name:	Nav form.PNG 
Views:	7 
Size:	60.3 KB 
ID:	19813

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

Similar Threads

  1. Replies: 4
    Last Post: 07-11-2014, 05:51 AM
  2. Macro to apply filter to form
    By mattzkn in forum Macros
    Replies: 3
    Last Post: 12-11-2013, 12:57 AM
  3. Replies: 1
    Last Post: 04-28-2013, 09:43 PM
  4. Replies: 2
    Last Post: 02-25-2013, 10:47 AM
  5. Replies: 5
    Last Post: 10-06-2010, 07:28 PM

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