Visual Basic Listbox clickevent

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • onyris
    New Member
    • Aug 2008
    • 42

    Visual Basic Listbox clickevent

    --------------------------------------------------------------------------------

    Hi guys , have 2 questions if anyone can help me .

    first - have a form which displays all the records i have in my database , and a search box for the user to search for a specific one .
    On the search button, i run a macro which opens another form with only the records found based on the search. So far so good :).

    Now one the second form first record found is displayed ( customer and deatils)
    and u can navigate through the rest . But i also have a listbox which holds only a field ( first_name ) so that the user instead of going though all 50 records ,he can select one record from the listbox.

    question 1
    How do i display on the page " 1 record found out of 50" ?
    i know about 50 cose is a count of all records , but what about 1 . how to i make to count those?

    question 2
    when i select a different customer from the listbox i want to fill up all the textbosex from the from with the details of the selected one .

    the form is bounded to the search query , so i dont want to chage that .
    any way in vb to bind the textboxes to the selected clikevent of the listbox ,but at the same time i want to keep the other record as well so i can navigate through them .

    Thanks
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    Originally posted by onyris
    question 1
    How do i display on the page " 1 record found out of 50" ?
    i know about 50 cose is a count of all records , but what about 1 . how to i make to count those?
    You want a way to determine the number of records that match the selected First Name from your ListBox control?
    Originally posted by onyris
    question 2
    when i select a different customer from the listbox i want to fill up all the textbosex from the from with the details of the selected one .

    the form is bounded to the search query , so i dont want to chage that .
    any way in vb to bind the textboxes to the selected clikevent of the listbox ,but at the same time i want to keep the other record as well so i can navigate through them .

    Thanks
    I find this too confusing.

    I suggest you create a new thread for this question (I would try to explain it more clearly if you can). It doesn't help to have two questions in the same thread anyway. Most people get confused too easily.

    Comment

    • onyris
      New Member
      • Aug 2008
      • 42

      #3
      Sorry for missunderstandi ng

      i'll put the second question on a different post to avoid confusing.

      for the first question i have already posted a new threat



      this is the post and hope u understand what i mean with that

      Comment

      • onyris
        New Member
        • Aug 2008
        • 42

        #4
        regarding question 2 i have posted a new threat for that



        hope u understand now what i mean.
        Thanks

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #5
          I'll lock this one then, and go and have a look at your new threads.

          Comment

          Working...