Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Posts
    160

    Unanswered: Listbox Selection

    Hi! norberto:

    The thing u designed was superb. But My design doesn't need comboboxes selection.

    Here I designed something with list boxes for selecting titles.

    I am sending the sample. Could U run it and see what is happening. I am getting some errors and moreover while I am adding Titles to a client to another list box Onemore title is adding to the first list box.

    I will describe it on the sample database I am sending.

    Thanks.
    Attached Files Attached Files
    Vad

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    Change the your query for the ListAvailable listbox to the following:


    SELECT tblTitlesAuto.TitleID, tblTitlesAuto.Title, tblClientsTitlesAuto.TitleID
    FROM tblTitlesAuto LEFT JOIN tblClientsTitlesAuto ON tblTitlesAuto.TitleID = tblClientsTitlesAuto.TitleID
    WHERE (((tblClientsTitlesAuto.TitleID) Is Null))

    Your orginal query was set up to show everything, but you only want to see what is not in the other table so your need to specify you are looking for a Null value in conjunction with your left join.

    S-

  3. #3
    Join Date
    Aug 2003
    Posts
    160
    Hi! sbaxter,

    After replacing the query with the SQL statement, if I move Titles to other LIstbox, It is not showing all the Titles.

    All the Titles are not visible frm me. Only I am getting some Titles.

    If there are totally 6 Titles.In those IF I select 4 To other Listbox, The remaining 2 should be in the FirstListbox. Unfortunately I am not getting that.

    Any Help will be appreciated

    Originally posted by sbaxter
    Change the your query for the ListAvailable listbox to the following:


    SELECT tblTitlesAuto.TitleID, tblTitlesAuto.Title, tblClientsTitlesAuto.TitleID
    FROM tblTitlesAuto LEFT JOIN tblClientsTitlesAuto ON tblTitlesAuto.TitleID = tblClientsTitlesAuto.TitleID
    WHERE (((tblClientsTitlesAuto.TitleID) Is Null))

    Your orginal query was set up to show everything, but you only want to see what is not in the other table so your need to specify you are looking for a Null value in conjunction with your left join.

    S-
    Vad

  4. #4
    Join Date
    Nov 2003
    Posts
    267
    Vad

    If you can open a 2000 DB I will send you aworking app with the SQL I sent, becuase it does work.

    Make sure you only put the is null in the criteria of tblClientsTitlesAuto.TitleID

    S-

  5. #5
    Join Date
    Aug 2003
    Posts
    160
    Hi! sbaxter,

    Yeah, I can Right now I am working with Access 2000 only. If u can That will be great.

    Thanks

    Originally posted by sbaxter
    Vad

    If you can open a 2000 DB I will send you aworking app with the SQL I sent, becuase it does work.

    Make sure you only put the is null in the criteria of tblClientsTitlesAuto.TitleID

    S-
    Vad

  6. #6
    Join Date
    Nov 2003
    Posts
    267
    I found out what you mean and fixed it so it will show the title not assigned to that client.

    I have to tell you that I really dislike working with Bound Forms. As evidenced by waht I had to do to get this to work. I you plan on doing a lot of development, i would learn more about UnBound forms and using more ADO. There is a lot more flexiblity with ADO ot DAO.

    Good Luck

    S-

Posting Permissions

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