Search for a record from Access Database, and populate records in Drop Down List, and View It

Hi,
I created a PDF form where I have open, next, previous buttons, and I'm able to connect to the access database, and it's working fine. Now, I want to be able to search by last name from the access database, and retrieve the results in a dropdown field, and then once i select the records in the drop downlist, i want to press a button to display the record. I have multiple records with the same last name. Please help, I searched the internet for hours, and can't find something similar. Your help is appreciated, and sample code is appreciated.

<%
int count = 0;
while (rs1.next()){ %>
<%if (count ==0)
{%>
<option value="<%=inputorthodon%>" selected >
<%=rs1.getString("ortho_name")%></option>
<%}
else{%>
<option value="<%=inputorthodon%>">
<%=rs1.getString("ortho_name")%></option>
<%}
++count;} %>
</select>
U may have to format this a bit. The idea is to use a count variable to put "selected" in only the first OPTION. After that, we don't have to.
Hope this helps.

Similar Messages

  • How do I add State/Province and Country to my drop down list?

    How do I add State/Province and Country to my drop down list?

    Hi Gen,
    My problem is that I'm working with the free version of Form Central - I'm willing to purchase a version.  Earlier in my form I have States as a drop down menu (see below) but can't copy it to make it appear later in the same document. I was trying to avoid recreating the entire form. Any tips on copying or duplicating a field inside a document.
    Best Regards,
    Gina Grant
    ink + thread
    312.970.1106 (p)
    773.435.6474 (f)
    www.inknthread.com
    CPS Vendor #: 98626
    The information contained in this email is confidential, proprietary and may be legally privileged. This email is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact ink + thread by e-mail ([email protected]) and destroy all copies of this email.

  • Creating a drop down list and linking it to Excel files

    How to create a drop down list and when i select any row in the dropdown list, it must open designated MS- Excel file? Can anyone help me in this with an example code?
    Thanks
    Anu

    Try this in 7.0 format.
    Attachments:
    Listbox for excel files.vi ‏15 KB

  • How can I restore the search bar drop down list and current search engine icon as it was in FF version 33?

    Is there a way to restore the search bar from version 33?
    I like seeing which search engine I have selected and the ability to change it with a drop down list BEFORE I highlight text, right-click, and select ' Search Google for "xxxx" '
    Any way to roll back this latest "improvement"?

    If you miss being able to switch search engines without going
    crazy with menus, try this out;
    '''[https://addons.mozilla.org/en-US/firefox/addon/context-search/ Context Search]''' {web link}
    Expands the context menu's 'Search for' item into a list of
    installed search engines, allowing you to choose the engine
    you want to use for each search.

  • How can I select from drop-down list and jumping to selected subform?

    I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
    drop-down list...A (jump to subform1)
                             B (jump to subform2)
                             C (jump to subform3)
    subform1
    subform2
    subform3
    ....end of form

    Hi,
    you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
    From a dropdowns exit event the script will look this way:
    switch (this.rawValue) {
              case "A" : xfa.host.setFocus("form1.page2.field1"); break;
              case "B" : xfa.host.setFocus("form1.page2.field1"); break;

  • Drop Down Lists and Value Change Events

    I have 4 drop down lists each with a set of values from the database.
    Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
    I have a Submit button which takes values from these 4 lists and puts it in the database.
    Problem:
    I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
    However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
    I tried to recreate this case in a Sandbox without a database , Here is the code:
    Page1.jsp
    <h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}"  onchange="this.form.submit();" >
                   <f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
    </h:selectOneMenu>
      <h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >                           
                  <f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
       </h:selectOneMenu>
       <h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
        <h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
       public SessionBean1() {
            list1.add(new SelectItem("0","0"));
            list1.add(new SelectItem("1","1"));
            list1.add(new SelectItem("2","2"));
            list1.add(new SelectItem("3","3"));
            list2.add(new SelectItem("a","a"));
            list2.add(new SelectItem("b","b"));
            list2.add(new SelectItem("c","c"));
            list2.add(new SelectItem("d","d"));
            map.put("0", "a");
            map.put("1", "b");
            map.put("2", "c");
            map.put("3", "d");
        private void fetch_data(String value){
             selectedList2=map.get(value);
        public void list1ValueChangeListener(ValueChangeEvent vce){
                fetch_data(vce.getNewValue().toString());
        public void addActionListener(ActionEvent event){
            result=selectedList2;
        }I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
    With this sand box project I cannot even get the second list to show the corresponding value.
    Any insight on this would be helpful

    Thank You Balus C,
    I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
    putting it as a reference here.
    One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
    I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
    Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
    Thanks Again

  • Drop down lists and email buttons

    I am creating a form and I have about twenty items in a drop down list. I was wondering if and how I can set it so each item selected will cause an email button I have to change address. i.e item 1 sets the email button to [email protected] and item 2 sets the button to [email protected] I think it has something to do with binding but I only have basic training so I am lost. Any help that you can give will be greatly appreciated . Thank you in advance

    As mentioned, you can´t do that in InDesign but fortunately it´s fairly easy task to do in Acrobat Professional. You didn´t mention what are you sending, just an empty email that sender can fill in email client, whole PDF as attachment or some form data from PDF... all those options are possible by few lines of javascript in Acrobat side.
    I made you a quick sample which just opens up an email client, populates email address based on choise that user has made in combobox and some custom subject and body meassage text. You can find it from my dropbox: https://dl.dropbox.com/u/17227987/sampleform.pdf
    There´s only two formfields in that PDF; combobox for choosing email recipient (AA = [email protected], BB = [email protected] etc) and submit button. Check javascript code from
    -combobox´s properties > Validate tab and
    -button´s properties > Actions > Run a javascript.
    In combobox, small javascript sets the myemail variable´s value based on the choise user makes. In Button there´s small javascript that triggers the email client and uses the value of myemail variable as a target email address.
    ps. this sample probably works only in Acrobat and Adobe Reader. I have no idea how for instance MacOS Preview supports PDF javascript, probably not very well....=)

  • Selection from one Drop down populates a second drop down list

    I have a form connected to a database. The database contains columns for project number, name, company name, address, etc.
    The first drop down I would select a distinct project number, once selected I'd like the second drop down to contain a selection set of all the companies assigned to that distinct project number.
    I'm assuming that this is possible?
    Thanks,
    Todd

    Thanks Paul,
    The 4th example in the Webinar is what we used to auto populate a users contact information when selecting their name from a drop down list. This name drop down has all the names in a particular table of the data base, we would like to filter that down by first selecting a project number from a drop down list which would cause the names to filter down to just those associated with the project number picked.
    Is there scripting that can be done that can accomplish this? We can get a single name to show in the drop down but it doesn't seem to want to return a list. Any thoughts?
    Thanks,
    Todd

  • Drop Down Lists, and other Problems after upgrade

    Noticed the problem on http://www.autotrader.com/cars-for-sale/?expandAllOptions=true&Log=0
    Drop down lists do not respond they way they did last week - before 36.0.1 upgrade.
    Choose a brand, and then you are supposed to be able to select from a list of models. Not happening.
    I have several of the privacy add-ons (see below) but they have not changed with the upgrade (unless they too were upgraded automatically.)
    FF is becoming less and less of a joy to use as the years go by.

    Note that your System Details list shows that you have a user.js file in the profile folder to initialize prefs each time Firefox starts.
    The user.js file is only present if you or other software has created this file and normally it wouldn't be there.
    You can check its content with a plain text editor (right-click: "Open with"; do not double-click).
    The user.js file is read each time Firefox is started and initializes preferences to the value specified in this file, so preferences set via user.js can only be changed temporarily for the current session.
    You can delete the user.js file if you didn't create this file yourself.
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Windows hides some file extensions by default.
    Among them are .html and .ini and .js and .txt, so you may only see file name without file extension.
    You can see the real file type (file extension) in the properties of the file via the right-click context menu in Windows Explorer.
    See also:
    *http://kb.mozillazine.org/Preferences_not_saved

  • How to use multiple drop down lists and do not allow duplicates.

    I am creating a roster that has multiple positions on multiple pages. I have a drop-down list that is populated with all of the employees and want to make sure that the same employee cannot be selected for multiple posts. Ideally, when one is selected in a position, that person would not be an option in the other drop-down lists. Also, when the form is published, the end user will not use the drop-down lists in order. I have found script to remove selected items, but it only works when the user makes selections in order (List1, List2, List3 etc).
    First time posting, any help would be appreciated.

    Look into the ring control.  It behaves a lot like an enum, but you can dynamically set its contents and values associated with those contents.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Selecting Top N records in a table using a slider or drop down list

    Hi Experts,
    I have a query that  displays 1000 records ( say) in VC iview.
    Can i have a drop down list in the variable form to control the number of records displayed in the output table by the user .
    or can i have a horizaontal slider ( Min value is 2 -max 1000)  to display the number of records in the output table  selected by the horizaontal slider.
    basically iam having a requirement to give the user the capability to select the Top N records of the output table...where the user enters the N value in Drop downlist of variable form or user slides the N value using Horizontal slider
    Thnaks
    P.Navakanth

    Hi
    Yes it is possible. First you need to create 'Condition' in BEx query where you have to create 'TOP N' & 'N' should be a variable input. Then you will get this in 'Variable Screen' of a query. In VC for this same variable you can use slider. Use 'Select' function in the 'Action' of the slider & pass it to require table/graph.
    Try this, this will give you the required result.
    Regards
    Sandeep

  • Formula that checks drop down list and then sums

    I have a table with a drop down list with two values: '$' and 'Hr' (cell called 'PType').  There is a cell called 'Proposed' that contains numerical data. The table is dynamic and can have more cells inserted via a button within the row.  I have a totals section that I want to total the SUM of 'Proposed' if the value in 'PType' is '$'.  I can't figure out what type of statement will allow me to write this.
    For now, my solution has been a hidden column whose cell simply states:
    if (PType == "$") then
        Proposed
    endif
    Then, in the totals section, I sum this hidden column since a value outside of '$' returns a '0' and won't affect my SUM.
    I am looking for a formula I can write that does this within the totals cell instead of having two cells.
    Thanks,
    Mallard27

    Here's my take on it.
    // form1.page1.subform1.table.footer.SUM::calculate - (JavaScript, client)
    var total = 0;
    for (i=0; i < form1.page1.subform1.table._row.count; i++) {
        if (table.resolveNode("row[" + i + "].Proposed").rawValue) {
            if (table.resolveNode("row[" + i + "].PType").rawValue == "$") {
                total = total + parseFloat(table.resolveNode("row[" + i + "].Proposed").rawValue);
    this.rawValue = parseFloat(total);
    Steve

  • Not getting the records from Access database

    Hi All,
    Iam creating a universe based on Access database. I am able to view the data from all the tables except one table. When i try to view the data there is one error message "Syntax error in from clause, State: 37000". Everything is ok at database side. What does this error means?
    Please help me on this.
    Thanks.

    Hi BOCP,
           Thanks for your reply. I have resolved my issue. Actually my issue was, I have a table "Date" in universe which was created in Access database, when i tried to view the Date Table values in Universe i was getting that Syntax error in From clause message. I came to know that Date is a keyword or predefined table in WebI & it wont accept that word as a user defined Table. So i renamed that table in Access and Universe. Now my issue was solved.
    Thanks,
    Swati.

  • I can no longer open any doc attachments. This was never a problem before. Also the W for Word is not an option in the chooser application drop-down list.

    At one point, all my Word icons turned to Microsoft orange icons. I resolved that issue by uninstalling Microsoft Office 2010 and not the starter. I have NEVER had a problem opening doc email attachments I have received. This is a new issue. I used to just double-click on the attachment icon and it opened. Now it gives me nothing. I can't seem to find Microsoft Word as a choice in the drop-down box either. I also tried selecting Microsoft virtual whatever it was, as was suggested in Google, but that did nothing either. I just want to go back to being able to double-click on my attachments and having them pop open. What went wrong in computerland?

    Actually, I solved it myself by compacting my inbox. Yes, it was Thunderbird. All my docs can now be opened. Word starter came with my computer already installed. Never had any trouble in two years until recently. I can now pick Microsoft Word virtual handler and it opens it. I still don't know what happened to the Word icon in the drop down box. Maybe it was never there to begin with, because I NEVER had to pick anything to open an attachment before. I just double-clicked on it and it opened.

  • How to display data with the same text and key in the drop down list?

    Hi All,
    Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    REPORT ZTESTING.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST,
          c(20) type c.
    *      c = 'select any'.
    data:begin of itab occurs 0,
          kunnr like kna1-kunnr,
          name1 like kna1-name1,
         end of itab.
    data:begin of jtab occurs 0,
          kunnr like kna1-kunnr,
          land1 like kna1-land1,
         end of jtab.
    PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
                              default 'SELECT'.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'p_list'.
    VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    APPEND VALUE TO LIST.
    VALUE-KEY = '2'.
    VALUE-TEXT = 'Country'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    start-of-selection.
    select kunnr name1 up to 20 rows from kna1 into table itab.
    select kunnr land1 up to 20 rows from kna1 into table jtab.
    case p_list.
    when '1'.
    loop at itab.
    write:/ itab-kunnr,itab-name1.
    endloop.
    when '2'.
    loop at jtab.
    write:/ jtab-kunnr,jtab-land1.
    endloop.
    endcase.
    <Added code tags>
    Moderator Message: Please use the "code" tags to format your code snippet.
    Edited by: Suhas Saha on Nov 17, 2011 11:19 AM

    shawnTan wrote:
    Hi All,
    >
    > Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    >
    >
    REPORT ZTESTING.
    >
    > TYPE-POOLS: VRM.
    >
    > DATA: NAME  TYPE VRM_ID,
    >       LIST  TYPE VRM_VALUES,
    >       VALUE LIKE LINE OF LIST,
    >       c(20) type c.
    >
    > *      c = 'select any'.
    >
    > data:begin of itab occurs 0,
    >       kunnr like kna1-kunnr,
    >       name1 like kna1-name1,
    >      end of itab.
    >
    > data:begin of jtab occurs 0,
    >       kunnr like kna1-kunnr,
    >       land1 like kna1-land1,
    >      end of jtab.
    >
    > PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
    >                           default 'SELECT'.
    >
    > AT SELECTION-SCREEN OUTPUT.
    >
    > NAME = 'p_list'.
    >
    > VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    > VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    > APPEND VALUE TO LIST.
    >
    > VALUE-KEY = '2'.
    > VALUE-TEXT = 'Country'.
    > APPEND VALUE TO LIST.
    >
    > CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    >
    > start-of-selection.
    > select kunnr name1 up to 20 rows from kna1 into table itab.
    > select kunnr land1 up to 20 rows from kna1 into table jtab.
    >
    > case p_list.
    > when '1'.
    > loop at itab.
    > write:/ itab-kunnr,itab-name1.
    > endloop.
    >
    > when '2'.
    > loop at jtab.
    > write:/ jtab-kunnr,jtab-land1.
    > endloop.
    > endcase.
    >
    > <Added code tags>
    >
    > Moderator Message: Please use the "code" tags to format your code snippet.
    >
    > Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
    This surely seems to be a bug to me(if not by design),  did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
    -Rajesh.

Maybe you are looking for

  • How to add a caption to photo in shared photo stream?

    Hi @all, I hope I am not right but there is no option of using the description/caption for a photo in my iPhoto library when I share it with other people in a photo stream? All I found was that you can use the comment field to add a caption-like text

  • How to enable auditor in BO XI 3.1

    Hi Experts, I have BO XI 3.1 installed in Sun Solaris OS working fine. I want to enable auditor and use these features. How can i do it as i don't find document for BO XI3.1 auditor. Regards, Suresh

  • Please answer me quickly .........

    Will Siri support iPad 2 in iOS 6 Please experts answer me , but a sure answer please.

  • Photoshop CS5 dragging error

    I cannot explain it any better than in this video. I'm using a MacPro OS 10.5.8 with Photoshop CS5 12.0.1. 8GB RAM. Never had this problem with CS4. Also using a Wacom Intuos tablet. Any suggestions?

  • Std::bad_alloc occurs only when using VS Graphics Debugger

    I'm using C# and SharpDX (a c# wrapper for directx) and I keep getting the following exception when using the Graphics Debugger in VS2012 and VS2013: First-chance exception at 0x7690c41f in Craft.exe: Microsoft C++ exception: std::bad_alloc at memory