Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2004
    Posts
    63

    Unanswered: Subform counting records 2 of 3 etc.

    Hello All,

    I have a subForm with Records selected by a comboBox in the main form.
    I have disabled the navigation buttons from the subform as they are duplicated in my form by buttons that match the overall feel of the DB.
    What I need to know is: Is it possible to have an unbound textBox with the current position (as usually shown in the navigation bit)? I have another box that uses the count function to display how many records, but how to show the position (e.g. 2 of 3) has got me stumped.

    I have tried just add 1 and take 1 from the count, starting at 1, but this was problematic.

    Is there a built-in way?

    Any ideas?

    Thanks,
    ChrisOfCatford

  2. #2
    Join Date
    Sep 2004
    Location
    Kuala Lumpur
    Posts
    60
    Check Bookmark Property in the help file. (I haven't used it yet so i won't say more. Also see AbsolutePosition Property, though it isn't recommended in this case).

  3. #3
    Join Date
    Sep 2004
    Posts
    63
    Hello again,

    Thanks waz

    I read the bookmark property bit in the help file and I now know less!

    Has anyone actually used this in the context that I want to?

    Thanks,
    ChrisOfPeckham

  4. #4
    Join Date
    Sep 2004
    Posts
    63
    I'll take that as a no then.

    Thanks,
    ChrisOfCatford

  5. #5
    Join Date
    Feb 2004
    Location
    Oklahoma City, OK
    Posts
    3
    I got this to work for me. ID is an AutoNumber field. The contents of txtONE match the "record number" in the navigation section.

    Private Sub Form_Current()
    Dim dbMe As Database
    Dim rsONE As Recordset

    Set dbMe = CurrentDb
    Set rsONE = dbMe.OpenRecordset("DELIMITREC704", dbOpenSnapshot)
    rsONE.FindFirst "ID = " & ID
    txtONE = rsONE.AbsolutePosition + 1

    rsONE.Close
    dbMe.Close

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •