Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    28

    Unanswered: Access --> SQL field returning ID only

    I've got an Access project using an SQL database for its data. It seemed fine in the initial form design, and I put a listbox on the form which retrieves dates from one of the columns/fields of a certain table and displays them. The dates look fine, and correct, but I put this is as a test:

    MsgBox List0.ItemData(0)

    And also tried:

    MsgBox List0.value

    Both of these, when activated, return the ID of the entity which the date corresponds to. How can I access the date, as it appears in the listbox?

    I could do this the VERY long way round, by taking the ID and using an SQL statement to retrieve the date of the entity matching this ID, but this seems ludicrous.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Doesn't seem that ludicrous to me.

    Let me guess, this a multi column list box which is bound to an invisible column? try List0.Column(1)... where "1" is the ordinal column number of the information you'd like to retrieve.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2005
    Posts
    28
    I got there mere seconds before your reply!!

    Thanks anyway! Is it just me or is the VB documentation not particularly structured?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It's just you...

    Just kidding, you'll learn how to get what you want out of it, it's part science and part art to get what you need in short order.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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