Results 1 to 9 of 9
  1. #1
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28

    Edit field criteria in subform

    Hi

    I have a subform that displays rows linked to a field in the form it is placed in. I have now realised that I need to edit the criteria of one of the fields so that it only displays 'effective' records but I can't find any way of adding a criteria for that field.

    I have limited knowledge of access but am used to adding criteria into queries and hoped it would be similar, but struggling to find away of doing it?

    Any help would be greatly appreciated.

    TIA
    Last edited by Back2Basics; 03-08-2017 at 09:34 AM. Reason: solved

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    So you want the subform to only show records based on the field in the main form and also only those records that has effective value in one of the subform fields?

  3. #3
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    the sub form should be bound to a query that uses the criteria you seek. therefore it will only display the appropriate records

  4. #4
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28
    Hi Bulzie

    That is right. The main form has a record for each customer and the subform has the relevant items for that customer. Some items are set as 'expired' or 'superseded' so I only want to show the 'effective' items in the 'Status' field so that it's clear to users what items are live and relevant for that customer. I thought I could simply create a query with the correct criteria and then create the subform again, but wondered if there was a way of updating rather than doing it from scratch again?

  5. #5
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28
    Hi NTC

    I thought would be the case, how do I find that query so I can edit it?

  6. #6
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    a saved query is an object found in the navigation pane on left

  7. #7
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Or maybe put this in the OnOpen event of the subform. Change YourField to the name of the field on your form.

    Me.Filter = "YourField = 'Effective'"
    Me.FilterOn = True

  8. #8
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28
    the subform wasn't created from a saved query. the only queries that I have in the navigation pane are those that I have created but none of them relate to the subform I have created. I created the subform using the subform button and going through the wizard to select a table and define the linked fields between the main form and the table I selected.

  9. #9
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28

    SOLVED - Edit field criteria in subform

    Many thanks Bulzie this seems to have done the job!

    I was sure there must be a query in the background somewhere but not being able to find it puzzled me. Thank for the help!

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

Similar Threads

  1. Replies: 3
    Last Post: 11-03-2016, 06:11 AM
  2. Replies: 1
    Last Post: 10-10-2012, 03:33 PM
  3. Replies: 1
    Last Post: 12-04-2011, 09:11 PM
  4. Replies: 1
    Last Post: 12-02-2011, 09:56 AM
  5. Replies: 3
    Last Post: 03-19-2011, 11:04 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