Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771

    Doesn't alter my comments.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    Green is offline Novice
    Windows 8 Access 2013
    Join Date
    Sep 2015
    Posts
    10
    I understand, just thought you would like to see what we were talking about.

    Thanks for the help.

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Okay, you have a plan for fixing?

    The sequence string is saved with every record on the main form?

    A VBA custom function might be able to get the record's sequence from the string. Something like:
    Code:
    Function GetSeq(intTask As Integer, strSeq As String) As Variant
    Dim aryTasks As Variant, x As Integer
    GetSeq = Null
    aryTasks = Split(Replace(strSeq, " ", ""), ",")
    For x = 0 To UBound(aryTasks)
        If intTask = Val(aryTasks(x)) Then
            GetSeq = x
            Exit Function
        End If
    Next
    End Function
    The function would be in a general code module and can be called from a query, like:

    GetSeq([TaskID], [Sequence]) AS SeqID

    That query would be a join of the parent and dependent tables so that the Sequence field is available.

    Be aware, custom functions called from query can cause slow performance.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    Green is offline Novice
    Windows 8 Access 2013
    Join Date
    Sep 2015
    Posts
    10
    I did not have a plan for fixing but what you have provided sounds like the best option forward.

    The sequence string is saved with every record on the main form.

    I am not too concerned with slow performance as much a visually see the tasks in a sequence for the user.

    Thank you very much for this!

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    If you use the query as RecordSource for subform, do not use INNER JOIN.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-12-2014, 02:43 PM
  2. Replies: 7
    Last Post: 09-10-2014, 12:33 PM
  3. Replies: 1
    Last Post: 08-05-2014, 03:36 AM
  4. Replies: 10
    Last Post: 01-29-2013, 08:59 AM
  5. search main form using the values in the subform
    By haritbhasin in forum Forms
    Replies: 1
    Last Post: 10-23-2012, 11:48 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