Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    66

    Unanswered: Prepopulating a Listbox

    Hi all,

    Maybe this is a simple one - is it possible to prepopulate a list box on one form by setting the value of it's bound column from another?

    I've a listbox on a form that gets it's record(s) from a search text field on the same form. No problem.
    Depending on the user's workflow, I also need to allow for prepopulating the same listbox (and preselecting a record in it) if the user is accessing the form from somewhere else.

    ie...
    - Scenario 1 - user enters a new person into system. Leaves system, and at a later date goes back in to view the person's record on a different form by using the search feature mentioned above - they type in the person's name or wildcard, and get that person, or a list of people in the listbox..

    - Scenario 2 - user enters new person into system, and from that screen, goes directly to search screen. Newly added person's name is already in the search field, and the person's record is ALREADY appearing selected in the listbox.

    I can prepopulate the search field grand, but can't prepopulate the listbox. I've tried setting the value of the listbox's bound column, but the form always launches with the listbox empty. The user has to hit enter on the the search field, the record appears in the list, and the user has to click the record to select it.
    This is the kind of thing I know the customer'll moan about.

    Hope this makes sense - I'm in a bit of a rush. If someone could point me in the right direction, say within the next half hour or so (!), that'd be great - I've a build to hand over...!

    Cheers,
    (I'm a dead man) Dave

  2. #2
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    421
    dont try to set the bound column just fill the listbox it stores the bound column....

  3. #3
    Join Date
    Nov 2003
    Posts
    66
    Sorry, Namliam

    I don't follow - what do you mean by 'just fill the listbox' - how???

    D

  4. #4
    Join Date
    Nov 2003
    Posts
    66
    Think I get what you meant - don't specifically reference the bound column, but just the listbox itself when setting it's value...?
    Anyhoo - experimented around a bit, and got the hidden text field bound to the list to prepopulate, which is enough to display what I need on the rest of the form automatically.
    Dunno how or why it's working, but it is!

    Cheers mate
    Dave

Posting Permissions

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