Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19

    Navigation Bar Record Count not updating

    New post here!!



    I have a form with 2 combo boxes. Once I select the 2 values, it populates my subform. The issue is when my subform populates, the record counter below on the navigation bar does not update.

    I have previous and next navigation buttons on the form which work. When I click on those the navigation bar record count updates correctly.

    Do I need to add something to my cboBox2 After Update Code to show the correct Record number on the Navigation Bar? Help Please. Thanks in advance. Please see my form code below:

    Option Compare Database

    Private Sub cboSassyAAC_AfterUpdate()
    cboTAMCN = ""
    cboTAMCN.Requery
    End Sub

    Private Sub cboTAMCN_AfterUpdate()
    subTEReview.Requery
    End Sub

    Private Sub Form_Current()
    If Me.CurrentRecord = 1 Then
    btnPrevious.Visible = False
    Else
    btnPrevious.Visible = True
    End If
    Dim rs As Recordset2
    Set rs = Me.RecordsetClone
    If Me.CurrentRecord = rs.RecordCount Then
    btnNext.Visible = False
    Else
    btnNext.Visible = True
    End If
    cboSassyAAC = [SassyAAC]
    cboTAMCN = [TAMCN]
    End Sub

    Private Sub btnNext_Click()
    On Error GoTo Err_btnNext_Click
    DoCmd.GoToRecord , , acNext
    subTEReview.Requery
    Exit_btnNext_Click:
    Exit Sub
    Err_btnNext_Click:
    If Err.Number <> 2105 Then MsgBox Err.Description
    Resume Exit_btnNext_Click
    End Sub

    Private Sub btnPrevious_Click()
    On Error GoTo Err_btnPrevious_Click
    DoCmd.GoToRecord , , acPrevious
    subTEReview.Requery
    Exit_btnPrevious_Click:
    Exit Sub
    Err_btnPrevious_Click:
    If Err.Number <> 2105 Then MsgBox Err.Description
    Resume Exit_btnPrevious_Click
    End Sub

    Private Sub Form_Load()
    cboSassyAAC = ""
    cboTAMCN = ""
    End Sub

    Private Sub Form_Open(Cancel As Integer)
    DoCmd.Maximize
    End Sub

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you are talking about the native NavigationBar on the bottom of Forms, the SubForm would need its NavBar turned on to see the SubForm RecordCount.

  3. #3
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    Thank you for the prompt response. Please see attached document. When I select values in cboTAMCN it populates the subform but it doesnt update the record number inthe navigation button below. When I click on my previous or next buttons it goes back or forward from the record number below, not from the value selected. Please let me know if you need additional info.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have the nav buttons enabled on *both* the MainForm and the SubForm? I would expect to see two nav controls.

  5. #5
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    I have them enabled only for the form. I plan on disabling both I just have them enabled to see why it doesnt go to the right place.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Enable (as a test) the nav buttons on the SubForm. It may help in understanding the issue.

  7. #7
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    I enabled navBar on sub and shows record 1 of 1 for each value populated.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you expect the RecordCount to add the two form's count together? I guess I don't understand the problem. It sounds like it is working as it should.

  9. #9
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    If I select a value from cboTAMCN, the record number on the form stays in whatever record is selected. If I select the 4th value from the dropdown it will still show 1 of 32830. When I hit next instead of going to 5th record, it goes to 2nd record. When i click on the next button it updates the record number below but when I click on values from cboTAMCN, it does not update the record.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    << light bulb goes off >> You are saying the nav control should show you what record you are on with your selections. So it should go to 2 of 32830 or whatever record you are on, right. Try issuing a DoEvents and see if the NavBar updates. It may just be a layering issue.

  11. #11
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    I put DoEvents in cboTAMCN and still nothing.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Can you zip up your db and post it so we can play a bit. Remove any sensitive data of course.

  13. #13
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    Let me know what you see. Again, when I select a value in cboTAMCN the values update, but not the record number on the form.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I can see nothing you are doing with the ComboBoxes that would move the MainForm off of the current record. Quite the opposite in fact. A Requery causes Access to redo the current Recordset and put the RecordPointer bact to the 1st record.

  15. #15
    ylatodd is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    19
    So how do I get it to show the correct number in the navigation bar? If you load the form, select a value in cboSassyAAC and then select a value in cboTAMCN other than the first record, you will notice the number below does not change from 1 and if you hit next it does not go to the following record it goes to record 2, regardless of what you selected previously.

    I am stuck and I dont know if I am explaining my problem in detail enough to show you what is going wrong so if this is the case I apologize.

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

Similar Threads

  1. Record/form navigation problem
    By kris335 in forum Access
    Replies: 1
    Last Post: 09-19-2011, 09:41 AM
  2. Replies: 1
    Last Post: 06-01-2011, 06:44 PM
  3. Record Navigation bar
    By sabre1 in forum Forms
    Replies: 5
    Last Post: 05-18-2011, 03:44 AM
  4. Record navigation buttons work backward
    By jonesy29847 in forum Access
    Replies: 22
    Last Post: 04-11-2011, 06:17 AM
  5. Replies: 2
    Last Post: 01-27-2011, 08: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