Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2009
    Posts
    4

    Question Unanswered: Problems with missing numeric columns List View Control

    Hi

    I am using the list view control in an unbound form. I have it reference a MS Access Query. In one query mostly text cols returned. Everything fine. In another query a lot of numeric cols returned some cols return ok. Other numeric cols are skipped all together compressing and misaligning the information in the control and misrepresenting the data:

    I would be happy to email db 1+meg if necessary to review with anyone interested. I have all dummy data.

    Enclosed is code snippet:
    ' Loop through recordset and add Items to the control.
    For intCount1 = 1 To rs.RecordCount
    If IsNumeric(rs(0).Value) Then
    Set NewLine = LV.ListItems.Add(, , Format(rs(0).Value, "0000000"))
    'Set NewLine = LV.ListItems.Add(, , Srs(0).Value))
    Else
    Set NewLine = LV.ListItems.Add(, , rs(0).Value)
    End If
    For intCount2 = 0 To rs.Fields.Count - 1
    NewLine.SubItems(intCount2 + 1) = Nz(rs(intCount2).Value, "") 'IIf(IsNumeric(rs(intCount2).Value), CStr(rs(intCount2).Value), rs(intCount2).Value)
    'LV.ListItems.Item(intCount1).SubItems(intCount2 + 1) = Nz(rs(intCount2), "")
    Next intCount2
    rs.MoveNext
    Next intCount1

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Please email the db, it will be easier to help you solve this problem.

    Have a nice day!

  3. #3
    Join Date
    Mar 2009
    Posts
    4

    email to where?

    to whom or how do I email it?

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can post it on the site as an attachment to your message.

    Have a nice day!

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    You don't say, but my guess is that you're running Access 2003 and probably have the notorious SP3 service pack installed! It's buggier than the Great Dismal Swamp, and one of the most common bug reported involves comboboxes/listboxes with disappearing data! The field(s) have some kind of formatting in place, such as you're doing here,

    Format(rs(0).Value, "0000000"))

    as per your posted code snippet. Remove any formatting from the fields and things should work short term, but the definitive solution is to install the hotfix for SP3.

    Here's a link to Allen Browne's site where you can find the latest news about these bugs, as well a link to the Hotfix:

    Microsoft Access Flaws - Bugs introduced by SP3 for Access 2003
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Join Date
    Mar 2009
    Posts
    4

    Really? You don't say!!

    I am running Access'03 SP3. Debugging it literally ignores data and values and skips the increments when adding column values. I doubted it was the code, however i'll try the avenues your presenting and report back.

    Thank you for the help

  7. #7
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Go to the site I gave you then follow the link to the hotfix and install it. It should solve your problem of "disappearing" data.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    Join Date
    Mar 2009
    Posts
    4

    OK that didn't do it :(

    Attached is db.

    1. Open db
    2. Form starts up automtclly.
    3. goto "Search" tab in default form and select "Contracts" scroll all the way to the right, note no data. I made sure records contained data..

    records maintained in fact_contract
    fact_contract

    function to fill form mainted in function:
    FillList
    Attached Files Attached Files

  9. #9
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    beraascerma's post has been reported as SPAM!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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