Results 1 to 12 of 12
  1. #1
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    List box row source (2k3)

    Again, the conversion to 2k3 is killing me. I have a list box that I use to display training information from a table filtered for a specific person (By SSN). There IS information in the table, so that's not the problem. Here's the row source:

    SELECT tblPFT.PFT_DATE AS [DATE], tblPFT.PFT_SCORE AS SCORE, tblPFT.PFT_CLASS AS CLASS FROM tblPFT WHERE (((tblPFT.SSN)=forms!frms1!sfrms1_individualinfo!s sn));

    forms!frms1!sfrms1_individualinfo!ssn is a bound text box, and the field is a text field.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    What is your question? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  3. #3
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List box row source (2k3)

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15> Can you see any inherent problem with my row source? When I view the subform this listbox rests on, no information is displayed, even though there is text in the box.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    Create a query with the same SQL as the row source of the list box.
    Open the form and navigate to a suitable record, then switch the query to datasheet view. What happens?
    - Records are displayed
    - No records are displayed
    - A parameter prompt is displayed
    - You get an error message

  5. #5
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List box row source (2k3)

    No records are displayed.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    If you don't get a parameter prompt or an error message, the SQL is valid and the reference to the form is recognized. So the query really doesn't find any matching records, and you have to find out why. Any chance that the SSN on the form is slightly different from the one in the table? For example, could one of the two contain leading or trailing spaces? The query looks for an exact match.

  7. #7
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List box row source (2k3)

    Hans,
    It is an exact match. I even opened tblPFT to double-check. <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    I don't think we'll get further without seeing the database...

  9. #9
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List box row source (2k3)

    Grumble grumble grumble...I knew that was coming. Here it is.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    When I select Jezza in lstNames, lstPFT shows 2 records with SSN = 0888888888
    When I select Hans in lstNames, lstPFT shows 1 record with SSN = 0999999999

    This is in Access 2002. I won't be able to test on Access 2003 before tomorrow afternoon at the earliest.

  11. #11
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List box row source (2k3)

    Hans,
    I am also able to use it in 2002....I'm trying to find ONE fix for BOTH versions. No worries, although the I'm leaving the unit I created this database for tomorrow morning.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: List box row source (2k3)

    I was able to test a bit earlier than I expected. The list box works correctly for me in Access 2003 too. Behavior is the same as in Access 2002.

    Since I can't reproduce the problem, I can only suggest some more testing. You could make the text box SSN on sfrmS1_IndividualInfo visible and place it somewhere you can see it. And add SSN to the row source of lstPFT (you must also increase the Column Count to 4, and make the list box wider). That'll enable you to see if the SSNs match up.

Posting Permissions

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