Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32
  1. #31
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21

    Thumbs up Everything works

    I tried a different way and everything worked out...

    ------------------------------------------------------------
    Private Sub Form_Load()
    Me.[ML-Sub].LinkMasterFields = vbNullString
    Me.[ML-Sub].LinkChildFields = vbNullString
    Me.[ML-Sub1].LinkMasterFields = vbNullString
    Me.[ML-Sub1].LinkChildFields = vbNullString
    End Sub

    Private Sub BookType_AfterUpdate()
    If Not Me.BookType = -1 Then


    If Len(Me.[ML-Sub].LinkMasterFields) = 0 Then
    Me.[ML-Sub].LinkMasterFields = Me.BookType.Name
    Me.[ML-Sub].LinkChildFields = "[Type Id]"
    End If
    If Len(Me.[ML-Sub1].LinkMasterFields) = 0 Then
    Me.[ML-Sub1].LinkMasterFields = Me.BookType.Name
    Me.[ML-Sub1].LinkChildFields = "[Type Id]"
    End If
    Else
    If Not Len(Me.[ML-Sub].LinkMasterFields) = 0 Then
    Me.[ML-Sub].LinkMasterFields = vbNullString
    Me.[ML-Sub].LinkChildFields = vbNullString
    End If
    If Not Len(Me.[ML-Sub1].LinkMasterFields) = 0 Then
    Me.[ML-Sub1].LinkMasterFields = vbNullString
    Me.[ML-Sub1].LinkChildFields = vbNullString
    End If
    End If
    End Sub
    ------------------------------------------------------------

    Thank you guys for responding and for your time spent...

  2. #32
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You should be aware that you should post code within code tags. This helps keep the code formatting, enhances readability and eliminates the spaces the forum editor add if the line length is longer that 50 characters.
    Click image for larger version. 

Name:	CodeTags.png 
Views:	12 
Size:	29.7 KB 
ID:	44472

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box won't select from list
    By Heathey94 in forum Access
    Replies: 11
    Last Post: 09-14-2016, 04:57 PM
  2. Combo to select all, need a little help
    By vicsaccess in forum Access
    Replies: 7
    Last Post: 06-20-2016, 12:47 PM
  3. how to add select all option in combo box
    By Vaibhav2015 in forum Forms
    Replies: 6
    Last Post: 09-30-2015, 10:09 AM
  4. Replies: 3
    Last Post: 06-09-2013, 05:35 PM
  5. Combo box select from two fields
    By cnestg8r in forum Access
    Replies: 0
    Last Post: 10-31-2008, 10:05 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