Another combo box question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gblack301
    New Member
    • Mar 2007
    • 17

    Another combo box question

    Hello all,
    I have reviewed some of the other posts regarding combo boxes and populating the form from the combo box but I am still experiencing an issue with one that I created for a project.

    The issue:
    I have setup a table called students, studentID is the key, when I select the studentID in the combo box only three of the text boxes are being populated. My code is below; any suggestions would be appreciated.

    Regards,
    Greg

    Code:
    Private Sub cboStudentID_AfterUpdate()
            Me.StudentID = Me.cboStudentID.Column(0)
            Me.txtFirstName = Me.cboStudentID.Column(1)
            Me.txtLastName = Me.cboStudentID.Column(2)
            Me.txtAddress = Me.cboStudentID.Column(3)
            Me.txtCity = Me.cboStudentID.Column(4)
            Me.txtState = Me.cboStudentID.Column(5)
            Me.txtZipCode = Me.cboStudentID.Column(6)
            'Fill in fields by using the DLookup()
           
    End Sub
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Since you're new here, Greg, and we have no way to know your skilll level, I have to ask: were all of these fields included when you set up the combobox?

    Also, since it concerns fields missing from a combobox, are you by chance using ACC2003? And if so, have you, recently installed the new update, SP3?

    Welcome to TheScripts!

    Linq ;0)>

    Comment

    • gblack301
      New Member
      • Mar 2007
      • 17

      #3
      Originally posted by missinglinq
      Since you're new here, Greg, and we have no way to know your skilll level, I have to ask: were all of these fields included when you set up the combobox?

      Also, since it concerns fields missing from a combobox, are you by chance using ACC2003? And if so, have you, recently installed the new update, SP3?

      Welcome to TheScripts!

      Linq ;0)>
      First thanks for the response; yes, I have included all of the fields in the combo box setup and I am using ACC2003. Sorry about that, I should have included that in the original post. I will install the new update and see what happens. Thanks again.

      Greg

      Comment

      • gblack301
        New Member
        • Mar 2007
        • 17

        #4
        Originally posted by missinglinq
        Since you're new here, Greg, and we have no way to know your skilll level, I have to ask: were all of these fields included when you set up the combobox?

        Also, since it concerns fields missing from a combobox, are you by chance using ACC2003? And if so, have you, recently installed the new update, SP3?

        Welcome to TheScripts!

        Linq ;0)>
        One more questions, I've installed the new update and getting the same results. Is there anything else that I may need to look out for? Also, below are the some of the parameters from my combo box.

        The three text boxes that are being populated are: txtFirstName, txtLastName and txtAddress. Thanks in advance for any help.

        Greg

        Code:
        name: cboStudentID
        
        control source: StudentID 
        
        row source type: Table/Query
        
        row source: SELECT Students.StudentID, Students.FirstName, Students.LastName, Students.Address, Students.City, Students.State, Students.ZipCode FROM Students WHERE (((Students.Active)=Yes));

        Comment

        • missinglinq
          Recognized Expert Specialist
          • Nov 2006
          • 3533

          #5
          The question was had you installed the new update, SP3. It wasn't a suggestion to do so! It was asked because it was a possible cause of the problem! With SP3 installed, fields in comboboxes "disappear" if the have any type of formatting in the underlying table defs! Go into the Design View for the table and see if the missing fields have anything in their format boxes. One frequent offender is the ">" symbol which is used to force upper case. If you find formatting present, remove it and see if that makes any difference.

          Linq ;0)>

          Comment

          • gblack301
            New Member
            • Mar 2007
            • 17

            #6
            Originally posted by missinglinq
            The question was had you installed the new update, SP3. It wasn't a suggestion to do so! It was asked because it was a possible cause of the problem! With SP3 installed, fields in comboboxes "disappear" if the have any type of formatting in the underlying table defs! Go into the Design View for the table and see if the missing fields have anything in their format boxes. One frequent offender is the ">" symbol which is used to force upper case. If you find formatting present, remove it and see if that makes any difference.

            Linq ;0)>
            Thanks, I appreciate the help.

            Greg

            Comment

            Working...