Geting value from selected row

Results 1 to 3 of 3

Thread: Geting value from selected row

  1. #1
    Join Date
    Dec 1969

    Default Geting value from selected row

    Hi All,<BR>I have a search button on my window. When the user clicks on this search button a new window will be opened with a list of records displayed in tabular form. Each row will have a check box and after the user check one of the check box user will hit select button and the value of the row will be passed to the calling window. How can I find out which row has been selected and how to get the values from the selected row. Any help appreciated.<BR><BR>Thanks in advance,<BR>Anil

  2. #2
    vw Guest

    Default RE: Geting value from selected row

    Use a form (with radio buttons if only choice is to be selected). The "Select" button submits the form. Then you Request.Form("variable") the name of the radio buttons to get the value. If you create the data in the table by reading from a database then you should be able to coordinate the radio button&#039s value with the data in the row. I&#039m not gonna write the code for you; it would take a bit of space. All you need to know is how to make a form and retrieve info from a database. That&#039s pretty fundamental and should be covered on this site somewhere.

  3. #3
    lagerBoy Guest

    Default RE: Geting value from selected row

    Sorry, that question was a bit hard for me to comprehend. I&#039ll reword it in my BASIC language and you tell me if that is what you are after.<BR><BR>You would like to give the user a list of options that they can choose (select) so that you can dynamically build a query on the following page.<BR><BR>For example:<BR><BR>If nothing is chosen then the default query will be run.<BR><BR>So we might have a page that allows users to select a listing of Nurses. If no options are selected the following query will be executed:<BR><BR>mySQL = "SELECT firstname, surname FROM nurses"<BR><BR>Now if the user checked a box on the calling page that was marked Surnames A - D our next page will look like this:<BR><BR>If chkSurAtoD = 1 Then<BR> mySQL = mySQL & "WHERE Surname Between A and D"<BR>End If<BR><BR>And we might also have a checkbox on the calling page that says, would you like to Sort [Y/N]? Then our next page will need another If....Then statement like so:<BR><BR>If chkSort = 1 Then<BR> mySQL = mySQL & "SORT BY Surname"<BR>End If<BR><BR>I hope you catch my drift. You will need to check my SQL syntax, because I&#039m fat AND lazy and normally use the Access SQL builder to build my SQL queries.<BR><BR>

Posting Permissions

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