Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    tabs-davegri-v02.zip
    OK. If you only want to have one column in the search combobox rowsource, do it like the above.


    Take care to enclose all data names and controls that contain a space with brackets.
    Then with spaces, make sure that you don't run strings together by not including spaces between them like "Like "
    Configure the search combobox as below:

    Click image for larger version. 

Name:	tabData.jpg 
Views:	6 
Size:	107.1 KB 
ID:	37072
    Click image for larger version. 

Name:	tabFormat.jpg 
Views:	6 
Size:	72.0 KB 
ID:	37073
    Last edited by davegri; 01-22-2019 at 01:10 PM. Reason: add images

  2. #17
    crhaines94 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    13
    Works Works Works! (ish)

    If I select the first record in the Avation query (which happens to be fore me MWT-6300), it will update the subform and it works beautiful!

    However, the other records do not update.

    Does it have something to do with the control source or the column values it is trying to find? The Part Numbers are all in the very first column in the queries / tables, which would be .column(0)


    I just wanted to also take the time to thank you for all the help! I really do appreciate it.

    Click image for larger version. 

Name:	pb2.JPG 
Views:	6 
Size:	26.4 KB 
ID:	37075Click image for larger version. 

Name:	Propertybox.JPG 
Views:	6 
Size:	44.7 KB 
ID:	37076Click image for larger version. 

Name:	sub.JPG 
Views:	6 
Size:	37.4 KB 
ID:	37077Click image for larger version. 

Name:	Doesnt Work.jpg 
Views:	6 
Size:	94.6 KB 
ID:	37078Click image for larger version. 

Name:	Works.jpg 
Views:	6 
Size:	108.7 KB 
ID:	37079

  3. #18
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    You have case 1
    me![Tinner and Mag].form.filteron = strsearch

    it should be me![Tinner and Mag]. form.filteron = true

  4. #19
    crhaines94 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    13
    Gothca, I fixed that. But that didnt fix how if I am on the AvSrch Tab and select anything other then mwt-6300, the form comes up blank. MWT-6300 is the first item in the list and happens to be the only one that works. Items 2-100 dont.


    Is there anything I can send you to make it easier for you to see exactly what I am looking at?


    When I switch tabs to the Mags and Tinner, and select the drop down list, it says "Syntax error (missing Operator) in query Expression 'Part Number'"

    then the combo box list disappears from both the avsearch and the mags and tinner. But if you reopen and click on the combo box in avsearch before clicking on the mag and tinner, the list will populate all the part numbers for aviation (not mag and tinner).

  5. #20
    crhaines94 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    13
    Here is what I have for Code:



    Code:
    Private Sub cboSearch_AfterUpdate()
    
    
    Dim strfilter As String
    Select Case TabForm.Value
    Case 0
    
    
    strfilter = "[Part Number] Like " & "'*" & Me.cboSearch.Column(0) & "*'"
    Me![Aviation Form].Form.Filter = strfilter
    Debug.Print strfilter
    Me![Aviation Form].Form.FilterOn = True
    
    
    Case 1
    
    
    strfilter = "[Part Number] Like " & "'*" & Me.cboSearch.Column(0) & "*'"
    Me![Tinner and Mag].Form.Filter = strfilter
    Debug.Print strfilter
    Me![Tinner and Mag].Form.FilterOn = True
    End Select
    
    
    End Sub

    Code:
    Private Sub TabForm_Change()
    
    
    Select Case TabForm.Value
    
    
    Case 0
    Me![Aviation Form].Form.FilterOn = False
    cboSearch.RowSource = "Select Part Number from Aviation Query;"
    
    
    Case 1
    
    
    Me![Tinner and Mag].Form.FilterOn = False
    
    
    cboSearch.RowSource = "Select Part Number from Mag and Tinner Query;"
    
    
    End Select
    cboSearch = vbNullString

  6. #21
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    See the red.
    Hard to remember this stuff, huh? That's why I NEVER put spaces in Access object names.

    Code:
    Private Sub TabForm_Change()
    
    Select Case TabForm.Value
    
    
    Case 0
    Me![Aviation Form].Form.FilterOn = False
    cboSearch.RowSource = "Select [Part Number] from [Aviation Query];"
    
    
    Case 1
    
    
    Me![Tinner and Mag].Form.FilterOn = False
    
    
    cboSearch.RowSource = "Select [Part Number] from [Mag and Tinner Query];"
    
    
    End Select cboSearch = vbNullString
    Last edited by davegri; 01-22-2019 at 03:19 PM. Reason: More red

  7. #22
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    I think the query name is [Mag and Tinner]
    EDIT. No, my bad. The form and query reverse the nouns.
    Code:
    Case 1
    
    strfilter = "[Part Number] Like " & "'*" & Me.cboSearch.Column(0) & "*'"
    Me![Tinner and Mag].Form.Filter = strfilter
    Debug.Print strfilter
    Me![Tinner and Mag].Form.FilterOn = True
    End Select
    
     End Sub

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo box uodating tabbed subform
    By crhaines94 in forum Forms
    Replies: 1
    Last Post: 01-21-2019, 10:09 PM
  2. SAMPLE Subform properties controlled by Main Form
    By ItsMe in forum Sample Databases
    Replies: 0
    Last Post: 09-23-2013, 04:58 PM
  3. Subform Refresh in a Tabbed Main Form
    By theosgood in forum Forms
    Replies: 5
    Last Post: 06-22-2012, 10:12 AM
  4. Goto a new record in tabbed subform
    By snoopy2003 in forum Programming
    Replies: 3
    Last Post: 03-05-2011, 04:24 PM
  5. Tabbed SubForm Issues
    By Exwarrior187 in forum Forms
    Replies: 5
    Last Post: 03-01-2011, 11:04 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