need to know how to auto fill form fields

I am having trouble creating automatic form field. I am using a SQL query to populate a dropdown menu. I need it to filter text as the user enters data in the form field.

here is a copy of my code


Select One
<%
While (NOT rsJobNo.EOF)
%>
">
<%=(rsJobNo.Fields.Item("job_no").Value)%>
<%
rsJobNo.MoveNext()
Wend
If (rsJobNo.CursorType > 0) Then
rsJobNo.MoveFirst
Else
rsJobNo.Requery
End If
%>


thanks

Comments

  • What exactly is the trouble ?Are you getting any errors ? or is it that the select field has no value ?

    Faustine
    -------

    : I am having trouble creating automatic form field. I am using a SQL query to populate a dropdown menu. I need it to filter text as the user enters data in the form field.
    :
    : here is a copy of my code
    :
    :
    : Select One
    : <%
    : While (NOT rsJobNo.EOF)
    : %>
    : ">
    : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : <%
    : rsJobNo.MoveNext()
    : Wend
    : If (rsJobNo.CursorType > 0) Then
    : rsJobNo.MoveFirst
    : Else
    : rsJobNo.Requery
    : End If
    : %>
    :
    :
    : thanks
    :

  • The code works as it is. My users want it to be better. The recordset that populates the dropdown menu is long. I have recieved requests to autofilter items as the user begins to type what they are looking for, to speed up data entry.

    Ex. If the dropdown were populated with names of all the months.
    and the users types J it should filter out all months that don't start with J,(or maybe not filter just scroll through the recordset quicker) if the user types JUL, it should filter out JUNE (or just give them JULY).

    I am not sure how to approch this problem.

    Thanks



    What exactly is the trouble ?Are you getting any errors ? or is it that the select field has no value ?
    :
    : Faustine
    : -------
    :
    : : I am having trouble creating automatic form field. I am using a SQL query to populate a dropdown menu. I need it to filter text as the user enters data in the form field.
    : :
    : : here is a copy of my code
    : :
    : :
    : : Select One
    : : <%
    : : While (NOT rsJobNo.EOF)
    : : %>
    : : ">
    : : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : : <%
    : : rsJobNo.MoveNext()
    : : Wend
    : : If (rsJobNo.CursorType > 0) Then
    : : rsJobNo.MoveFirst
    : : Else
    : : rsJobNo.Requery
    : : End If
    : : %>
    : :
    : :
    : : thanks
    : :
    :
    :
  • : The code works as it is. My users want it to be better. The recordset that populates the dropdown menu is long. I have recieved requests to autofilter items as the user begins to type what they are looking for, to speed up data entry.
    :
    : Ex. If the dropdown were populated with names of all the months.
    : and the users types J it should filter out all months that don't start with J,(or maybe not filter just scroll through the recordset quicker) if the user types JUL, it should filter out JUNE (or just give them JULY).
    :
    : I am not sure how to approch this problem.
    :
    : Thanks
    :
    :
    :
    : What exactly is the trouble ?Are you getting any errors ? or is it that the select field has no value ?
    : :
    : : Faustine
    : : -------
    : :
    : : : I am having trouble creating automatic form field. I am using a SQL query to populate a dropdown menu. I need it to filter text as the user enters data in the form field.
    : : :
    : : : here is a copy of my code
    : : :
    : : :
    : : : Select One
    : : : <%
    : : : While (NOT rsJobNo.EOF)
    : : : %>
    : : : ">
    : : : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : : : <%
    : : : rsJobNo.MoveNext()
    : : : Wend
    : : : If (rsJobNo.CursorType > 0) Then
    : : : rsJobNo.MoveFirst
    : : : Else
    : : : rsJobNo.Requery
    : : : End If
    : : : %>
    : : :
    : : :
    : : : thanks
    : : :
    : :
    : :
    :
    USE JAVASCRIPT
















    Please enter the first few letters of the item you are looking for.








    Select One
    <%
    While (NOT rsJobNo.EOF)
    %>
    ">
    <%=(rsJobNo.Fields.Item("job_no").Value)%>
    <%
    rsJobNo.MoveNext()
    Wend
    If (rsJobNo.CursorType > 0) Then
    rsJobNo.MoveFirst
    Else
    rsJobNo.Requery
    End If
    %>









    Not tested!!!!
    /Haxme


  • : : The code works as it is. My users want it to be better. The recordset that populates the dropdown menu is long. I have recieved requests to autofilter items as the user begins to type what they are looking for, to speed up data entry.
    : :
    : : Ex. If the dropdown were populated with names of all the months.
    : : and the users types J it should filter out all months that don't start with J,(or maybe not filter just scroll through the recordset quicker) if the user types JUL, it should filter out JUNE (or just give them JULY).
    : :
    : : I am not sure how to approch this problem.
    : :
    : : Thanks
    : :
    : :
    : :
    : : What exactly is the trouble ?Are you getting any errors ? or is it that the select field has no value ?
    : : :
    : : : Faustine
    : : : -------
    : : :
    : : : : I am having trouble creating automatic form field. I am using a SQL query to populate a dropdown menu. I need it to filter text as the user enters data in the form field.
    : : : :
    : : : : here is a copy of my code
    : : : :
    : : : :
    : : : : Select One
    : : : : <%
    : : : : While (NOT rsJobNo.EOF)
    : : : : %>
    : : : : ">
    : : : : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : : : : <%
    : : : : rsJobNo.MoveNext()
    : : : : Wend
    : : : : If (rsJobNo.CursorType > 0) Then
    : : : : rsJobNo.MoveFirst
    : : : : Else
    : : : : rsJobNo.Requery
    : : : : End If
    : : : : %>
    : : : :
    : : : :
    : : : : thanks
    : : : :
    : : :
    : : :
    : :
    : USE JAVASCRIPT
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :

    :
    :
    : Please enter the first few letters of the item you are looking for.
    :
    :
    :
    :
    :
    : Select One
    : <%
    : While (NOT rsJobNo.EOF)
    : %>
    : ">
    : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : <%
    : rsJobNo.MoveNext()
    : Wend
    : If (rsJobNo.CursorType > 0) Then
    : rsJobNo.MoveFirst
    : Else
    : rsJobNo.Requery
    : End If
    : %>
    :
    :
    :
    :

    :
    :
    :
    :
    :
    : Not tested!!!!
    : /Haxme
    :
    :
    : ________________________
    Thank you. I will try it.
  • Hi,
    I also wanted to do exactly this! And the code of Haxme is working wonders.
    But there is one flaw...
    When I start typing the name, the other names (starting with other characters) disapper from the listbox!

    This is obviously something that I don't want.
    I'm sure Haxme can fix this.

    Regards,
    Surajit



    : USE JAVASCRIPT
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :

    :
    :
    : Please enter the first few letters of the item you are looking for.
    :
    :
    :
    :
    :
    : Select One
    : <%
    : While (NOT rsJobNo.EOF)
    : %>
    : ">
    : <%=(rsJobNo.Fields.Item("job_no").Value)%>
    : <%
    : rsJobNo.MoveNext()
    : Wend
    : If (rsJobNo.CursorType > 0) Then
    : rsJobNo.MoveFirst
    : Else
    : rsJobNo.Requery
    : End If
    : %>
    :
    :
    :
    :

    :
    :
    :
    :
    :
    : Not tested!!!!
    : /Haxme
    :
    :
    :



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories