Results 1 to 7 of 7
  1. #1
    ratercero is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2017
    Posts
    16

    Filter form using Combobox

    Hi,



    Lokking to create a combobox to filter a record and be able to edit certain fields, the combobox should not edit entries the entry just filter them to be edited on a subform.

    But I'm no able to filter, here is my code:



    Code:
    Private Sub FORMULA_CODE_AfterUpdate()
    
    
    TBL_MAIN_RCP.Form.Filter = "[MR_ID]= '" & CMB_FORMULA_CODE & "'"
            TBL_MAIN_RCP.Form.FilterOn = True
    
    
    End Sub

    Screensots attached.

    Thanks

    Click image for larger version. 

Name:	FORM_QUERY.JPG 
Views:	12 
Size:	58.2 KB 
ID:	28821
    Attached Thumbnails Attached Thumbnails QUERY FORM DESIGN VIEW.JPG  

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You don't need a filter. Link the subform MR_ID to the main form CMB_FORMULA_CODE.

  3. #3
    ratercero is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2017
    Posts
    16
    Hello aytee111,

    How can I do that? Relashionship table? property sheet of MR_ID? can to share a screenshot or reference?

    thanks again

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Click on the subform object, find the two properties - Link Master and Link Child. This links the two objects together so that when the Master Link field value changes then the subform will change along with it. If your main form is unbound, which it can be based on your screenshots, then Access will give you an error telling you you can't link between unbound forms. This is not true and you can ignore the error.

  5. #5
    ratercero is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2017
    Posts
    16
    Still not working:

    Click image for larger version. 

Name:	LINK_CAPTURE.JPG 
Views:	10 
Size:	238.6 KB 
ID:	28831Click image for larger version. 

Name:	Capture not working.JPG 
Views:	10 
Size:	53.7 KB 
ID:	28832

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    See post # 2

  7. #7
    ratercero is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2017
    Posts
    16
    Aytee111 thanks again! I was using the wizzard and did not allowed me to select CMB_FORMULA_CODE so I did it manually.

    Works perfectly

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

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2017, 10:33 AM
  2. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  3. Replies: 29
    Last Post: 08-16-2011, 05:52 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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