Results 1 to 7 of 7
  1. #1
    millerdav99 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10

    Navigation Buttons Stop My Code


    Well I am learning Access on my own which has turned out to be quite the task. This is my first post here.

    Anyway I have a bunch of list boxes on my forms, when you click one, it updates the list in the next listbox. The code is working when I initially pull up the form. The code is linked to the AfterUpdate event of listbox1 and is in the module for the form the controls are on.

    After I hit any of the generic navigation buttons the data in the 2nd listbox no longer changes. Eventually I want to put my own navigation buttons, but I was just trying to get that listbox update to work first.

    Any help would be appreciated.

  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
    How about posting the code you have in the AfterUpdate event of ListBox1? Don't forget to use the code tags (the # button in the advanced bar).

  3. #3
    millerdav99 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    The first list box is called List84 and the second is LstIssues

    Code:
    Private Sub List84_AfterUpdate()
     
       Dim strSQL As String
       strSQL = "SELECT [tblQuestionsProblems].[" & Forms![frmCallRecordEntry]!List84
       strSQL = strSQL & "] FROM tblQuestionsProblems;"
       Forms![frmCallRecordEntry]!LstIssues.RowSourceType = "Table/Query"
       Forms![frmCallRecordEntry]!LstIssues.RowSource = strSQL
     
    End Sub
    Last edited by RuralGuy; 03-18-2011 at 09:41 AM. Reason: Added Code Tags

  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
    Okay, now what is the RowSource of the List84 ListBox?

  5. #5
    millerdav99 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    The rowsource for List84 is tblmachinequestionsproblems. It is a field list.

    So the fields from tblmachinequestionsproblems are the data for List84, then in each column is the data that will display in LstIssues

  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
    Uhhh...I have no idea what tblmachinequestionsproblems is. Is that the name of a table? What does "It is a field list." mean?

  7. #7
    millerdav99 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    tblmachinequestionsproblems is a table. It is the rowsource for List84. The row source type of List84 is a field list. The fields from the table tblmachinequestionsproblems are what fills List84.

    In tblmachinequestionsproblems under each field is information that will go into LstIssues.

    When the form is displaying record 1 in its source table, the list boxes work correctly, if I navigate to a different record they do not work.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-27-2011, 08:04 AM
  2. Navigation buttons deafult saving
    By accesscoder in forum Forms
    Replies: 3
    Last Post: 10-16-2010, 03:24 PM
  3. Replies: 0
    Last Post: 12-12-2009, 04:45 PM
  4. Navigation Buttons not working please help
    By dinarocks74 in forum Access
    Replies: 3
    Last Post: 06-26-2009, 10:15 AM
  5. Navigation Code
    By henryclay in forum Forms
    Replies: 2
    Last Post: 11-15-2006, 09:48 AM

Tags for this Thread

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