Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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

  • faustinegeorgefaustinegeorge Posts: 351Member
    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
    :

  • thomalmathomalma Posts: 3Member
    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
    : :
    :
    :
  • haxmehaxme Posts: 65Member
    : 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


  • thomalmathomalma Posts: 3Member
    : : 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.
  • slaha11slaha11 Posts: 28Member
    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.