Results 1 to 5 of 5
  1. #1
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88

    Custom Current Record Box


    I've used the better part of 2 hours searching here and all over the interwebs for a way to create a custom current record box just like the one that comes by default in access. I created 2 text boxes to show my current and total records (not by ID) and I would like to create another box to jump to a specific record of my choosing. I've used a macro that I had for a search box on another access program I made, but cannot make it work. Below are my macros that didn't work. Also, if there's a VBA that would work, I would take it.

    1. =[txtCounter2] Like "*" & [Forms]![frmTest3]![txtJumpTo] & "*"

    2. =[Form].[CurrentRecord] Like "*" & [Forms]![frmTest3]![txtJumpTo] & "*"

    3. =[ID] Like "*" & [Forms]![frmTest3]![txtJumpTo] & "*"

    On #1, txtCounter2 is my total records found.
    On #2, Form.CurrentRecord is of course my current record. No matter if I delete it, the order will prevail.
    On #3, I tried using the ID which is NOT by current record but just wanted to know if I will work...it did not.
    Last edited by ortizimo; 03-18-2020 at 10:03 AM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    if the form is showing the records, put a textbox in the footer w data set to: =Count([field])
    this will give you the count
    If the form shows only 1 record then use:
    =dCount("[field]", "query")

    im not sure what the other 2 fields are supposed to do on the form.

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    See it this will work for you. it's VBA behind the form.

    Click image for larger version. 

Name:	goto.png 
Views:	6 
Size:	22.9 KB 
ID:	41347

    CustomNavigationCodeInForm.zip
    Last edited by davegri; 03-18-2020 at 10:34 PM. Reason: add image

  4. #4
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by ranman256 View Post
    if the form is showing the records, put a textbox in the footer w data set to: =Count([field])
    this will give you the count
    If the form shows only 1 record then use:
    =dCount("[field]", "query")

    im not sure what the other 2 fields are supposed to do on the form.
    Yes. I already have both text boxes for that...I just now need a "searchbox" to enter a record number (i.e. 22) and the form (using a button) will jump to that number based on current.record...I hope.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Here are some articles you might read:

    What, no record numbers? http://www.allenbrowne.com/xbase-03.html

    Duplicate "Record x of y" http://access.mvps.org/access/forms/frm0026.htm

    Record Counter, Record X of Y, using custom form navigation in Microsoft Access: http://www.databasedev.co.uk/navigat...ord-count.html

    Record x of y https://bytes.com/topic/access/answe...675-record-x-y

    https://www.utteraccess.com/forum/Di...-t1008607.html

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

Similar Threads

  1. Replies: 5
    Last Post: 08-18-2018, 10:23 AM
  2. Replies: 7
    Last Post: 01-04-2018, 06:35 PM
  3. Replies: 8
    Last Post: 07-23-2017, 02:04 PM
  4. Replies: 3
    Last Post: 02-06-2015, 01:18 PM
  5. Replies: 16
    Last Post: 02-06-2013, 03:06 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