Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Form Problem (2002)

    Post deleted by Leesha

  2. #2
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form Problem (2002)

    Hi,

    I'm enclosing a stripped down version of a database which is saved in 97 format as I couldn't get it small enough otherwise. The form will open to frmNameLookup. I've taken out all code. My problem with the form is that the text box [txtStatusID] should update to column 6 of lstName and it doesn't. I don't know why.

    Thanks,
    Leesha

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Form Problem (2002)

    Two things

    lstName has only got five columns.


    When you refer to a column in a listbox, the column numbers are zero based, so the sixth column is actually column(5)
    Regards
    John



  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form Problem (2002)

    Hi John,

    When I put in column(5) I get a date, not the number that is in the last column. I'm confused.

    Leesha

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Form Problem (2002)

    Are you trying to show the field StatusID?

    StatusID is the seventh column in the query that provides data for the listbox, so if you give the listbox 7 columns statusID will then be in the listbox, and you can show it using column(6)

    column(6) refers to the columns inthe listbox not the columns in the underlying query.
    Regards
    John



  6. #6
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form Problem (2002)

    Oh God! I can't even believe I missed that! I've checked and rechecked and changed the form so many times trying to get it to work I never even looked at the column count! Time to put this away for a bit I think!

    Thanks so much,
    Leesha

Posting Permissions

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