Populate imagebox based on selection from listbox

Hi,
First off, I am not a developer, but I have been able to do quite a few things in Access VBA to suit my needs. 
I have created an access "application" that lists product information based values entered in a textbox and combobox. Now I need to display the product image as well.
I have a form with a textbox that the user types in a product brand code. This code determines the styles that are populated in the style combobox (these changes as soon as the brand code changes). I then have a button that runs a query to fetch products
that have the style and brand as per the previously selected values. I then have a listbox that displays the data from the query. the other fields on the form are populated based on the selection made in the listbox (each time a new row is selected, the details
on the form change). 
Up to this point I everything works fine. Now I need to populate an image box based on the selection made on the list. I have a lot of images and they are all named
brand-style.jpg
My question is: How do I populate this image box based on the selection made in the list?
"Of all the things I have lost, I miss my mind the most"

Store the full path to each image file in a text column in the Products table.  Return this as a hidden column in the list box by setting its column width to zero.  Set the ControlSource property of the image control to reference the list box's
hidden column.
You'll find examples of how to load an image into an image control in various contexts as Images.zip in my public databases folder at:
https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
Ken Sheridan, Stafford, England

Similar Messages

  • Populate field based on selection from another field?

    I'm using a Data Connection with a SQL query that returns two fields (StNameFull and ADDRKEY). I have a drop-down list called "Address" with the list items dynamically bound to StNameFull, so the user can select the address.
    What I'm trying to do is populate the second field "Key" with the corresponding record, based on the selection made from the drop-down list.
    Is it possible to script this so that when the Address is selected the Key will automatically fill in with the key that matches the address selcted?
    I currently have "Key" as a text field bound to ADDRKEY, but not sure how to have it check what was selected in "Address"
    Thanks so much,
    - Kevin

    Yes it is possible but you will have to write some script to do it. You wil also have to ge the DataConenction to execute a SQL statement. There is a good blog on this topic at this location:
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Paul

  • Polulate textfield(s) from a MS SQL Database based on selection from DropDown List

    I am new to LiveCycle Designer. I am trying to create a Master Bill of Lading form. I want the user to be able to enter a Store Number from a in a text field and, based on what they enter I want to populate the address information from a database on my SQL Server.
    When I bind the address fields from the database, I only see the first record in the database.
    I'm not sure where to go from here...
    Thanks in advance,
    Jeremy

    That seemed to fix my error and returned the value to my DDL.
    I have modified the code so it looks at the clone of my dataConnection (dcStoreData)
    CODE:
    btnClear.MainPage.sStNo::change - (JavaScript, client)
    var inStrNbr = xfa.event.newText;
    if (inStrNbr == ""){
    app.alert("You must enter a valid name - try again!") } var nIndex = 0;
    while(xfa.sourceSet.nodes.item(nIndex).name != "dcStoreData")
    nIndex++;
    tfStoreID.rawValue = inStrNbr;
    var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);
    // the node pertaining to the data connection specified
    //app.alert(oDB.saveXML("pretty"));
    //set up sql call to DB to get specifics about employee
    oDB.nodes.item(1).query.setAttribute("text", "commandType");
    oDB.nodes.item(1).query.select.nodes.item(0).value = "Select * from tblStoreMast_LastVersion where StorNbr = '" + inStrNbr + "'";
    //app.alert(oDB.nodes.item(1).saveXML("pretty"));
    //now connect to DB and get a record
    oDB.open()
    oDB.close();
    it runs with no error and I am seeing the value it has given my DDL.rawValue
    Now I get the "error:"
    GeneralError: Operation failed.
    XFAObject.open:16:XFA:btnClear[0]:MainPage[0]:sStNo[0]:change
    ado2xfa operation failed.  Item cannot be found in the collection corresponding to the requested name or ordinal.
    My Store Number is stored as an int in the database.
    Do I have to somehow cast it as a character?
    Sorry for the headache!
    Jeremy

  • Populate second drop down box based on selection from first drop down box

    Hello, I have a situation involving a drop down box with 9 items to choose from. What I want to do is depending on which of the 9 items the client chooses, this will determine what items are populated in the second drop down boxes (the items in the second drop down box will be mirrored on 9 other drop down boxes).
    For example, my first list box would be titled Review Type and there would be MF, VA, FA, etc. If the MF was selected, then the 10 boxes below (all drop-downs) will be prepopulated with a specifc selection of topics and if they chose VA then another set of topics would be prepopulated.
    Can you please point me out on the proper script to accomplish this? I don't have a xml/data source to connect to so I will be manually inputting the choices.  Thanks!
    Header 1
    Header 2

    I came across a sample of a script that seems to do what I want it to however I can't seem to get it to work all the way through.  It only compiles the items from the 1st case and not the 2nd or 3rd case.  If I click on the 1st case, it will not clear if I click on the 2nd or 3rd case. The items from the 1st case stays static and shows up for other cases.  However if I open the form and click on the 2nd or 3rd case first, it's blank and nothing shows up. Can you please help me out with any fixes to this problem?  Please help!!
    Here's the script:
    switch (this.rawValue){
    case "General Client File Review":
    ft1.clearItems();
    ft1.rawValue
    = null;ft1.addItem("UBIS New Account Application");
    ft1.addItem("Suitability Update Form");
    ft1.addItem("Trust Certification Form");
    ft1.addItem("Corporate Account Form");
    ft1.addItem("Partnership Account Form");
    ft1.addItem("LLC Account Form");
    break; 
    case "529 Plan":
    ft1.clearItems();
    ft1.rawValue
    = null;ft1.addItem("UBIS New Account Application");
    ft1.addItem("Suitability Update Form");
    ft1.addItem("Trust Certification Form");
    ft1.addItem("Corporate Account Form");
    ft1.addItem("Partnership Account Form");
    ft1.addItem("LLC Account Form");
    ft1.addItem("529 College Plan Disclosure");
    ft1.addItem("Vendor Application");
    ft1.addItem("Fund Direct Addition Form");
    ft1.addItem("Investment Replacement Form");
    ft1.addItem("RT Transaction Approval");
    break; 
    case "Direct Held Mutual Fund":
    ft1.clearItems();
    ft1.rawValue
    = null;ft1.addItem("UBIS New Account Application");
    ft1.addItem("Suitability Update Form");
    ft1.addItem("Trust Certification Form");
    ft1.addItem("Corporate Account Form");
    ft1.addItem("Partnership Account Form");
    ft1.addItem("LLC Account Form");
    ft1.addItem("Mutual Fund Disclosure");
    ft1.addItem("FINRA MF Expense Analyzer");
    ft1.addItem("Vendor Application");
    ft1.addItem("Fund Direct Addition Form");
    ft1.addItem("Investment Replacement Form");
    ft1.addItem("RT Transaction Approval");
    break;}

  • How Do I:  Fill a read-only field based on selections from 2 DDlists?

    Follow-up from issue:  
    http://forums.adobe.com/message/2417876#2417876
    I have 2 drop-down lists...  "Department" and "SubDepartment"
    The selection in DDlist "Department" spawns a unique list in DDlist "SubDepartment"
    I select the proper items from both DDlists.
    When I do this, I want read-only text field "NameOnIDBadge" to be populated with a pre-defined entry.
    Example:
    In "Department" DDlist, select item "Finance & Administration"
    In "SubDepartment" DDlist, select item "Food Service" from the list that appears
    THEN:
    In read-only text field "NameOnIDBadge" the following predefined read-only text appears:  "Contract Food Serv."
    (Thanks to Paul, I already know how to make the selection in DDlist "Department"  affect the selection list in DDlist "SubDepartment"
    but I don't know how to make the selection of both DDlists create a new pre-defined entry in a text field.)
    I have attached a mockup of the file I am working with...

    I tried that but a few things went wrong.
    1. After I select "Food Service" in the second "SubDepartment" DDlist, a Javascript error message pops up (see attached), and I have to click it to make it go away.  Then the text "Contract Food Serv" appears in the text box.
    2. If I select a different value in the Department DDlist, the rawtext still remains in place... it should clear out.
    3. The raw text seems to be based on the selection of the SubDepartment DDlist only.  However, I need specific raw text to be generated based on the combination of BOTH DDlists.   (It could happen that a totally different Department DDlist could have the same item in its corresponding SubDepartment DDlist.  In that case, the rawtext would be completely different.)
    Correct example:
    Department DDlist = Finance & Administration
    SubDepartment DDlist = Food Service
    NameOnIDBadge = Contract Food Serv  <-- CORRECT
    Incorrect example:
    Department DDlist = Clinical Services
    SubDepartment DDlist = Food Service
    NameOnIDBadge = Contract Food Serv   <--  INCORRECT   (it might be something else)

  • Automatically fill input fields based on selection from dynamic drop down

    Hi All,
    I tried to search before posting, but i cannot find appropriate thread (maybe wrong keyword).
    My scenario:
    1. In my offline interactive form, I have:
        a.  Material Number --> drop down field with "Allow Custom Text Entry" ticked
        b.  1 execution button to call web service
        c.  Material Group - Input Field (Read Only)
    2. User will enter material number with wild card character (eg: ABC*).
        User will then click the execution button.
        Web Service in result will return all materials that match the entered material number.
        Dynamic binding will do the magic to generate the drop down list.
    3. Beside material number, web service will also return material description and material group.
        Below is the illustration:
         Material        Description       Material Group
         ABC              Material ABC               GRP01
         ABCDE        Material ABCDE          GRP02
    --- so far so good ---
    My requirement:
    Every time user select material from the drop down list, i want to auto-populate field "Material Group" (which value is also returned by web service).
    I know i need to put the script on event change of the drop down field.
    But i don't know how to read internal table returned by web service.
    Hope someone can enlighten me.
    Thanks in Advance !!!

    Solved after reading:
    1. /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    2. Chapter 7 of Live Cycle Designer Scripting Basics
    (http://help.adobe.com/en_US/livecycle/9.0/LiveCycle_Designer_Scripting_Basics.pdf)
    Thanks.

  • Conditionaly select the physical table based on selection from prompt.

    Hi expert.
    we have one logical table with two LTS(LTS A and LTS B). LTS A is at day level and LTS B is at week level.
    So i have created a dashboard prompt which returns as day and week in drop down(SQL Result).
    So when we select Day it should run from the day table and when we select Week it should run from week table.
    How to do that...

    Amotoj,
    This scenario is exactly what the Cascade parent is meant for.   You would define your screen to have multiple fields where if you select a value in field 1, field 2 will be automatically filtered based on the first selection.
    You will need the appropriate indexes on the Complex Table to support it but it is fairly straight forward.
    If there a reason you don't want to use multiple fields?
    --Bill

  • Seeking Pdf form help - javascript formula to auto-populate fields based on data from other fields.

    Hi there, I am new to PDF form work, and am wondering if someone could help me with a javascript formula.
    I want to auto-populate the EXPIRYDATE field, as the same date as the entered AUTHORIZATIONDATE field, but 4 years later.
    So, I want to be able to enter 11/14/2014 in the AUTHORIZATIONDATE date, and have 11/14/2018 auto populate in the EXPIRYDATE field.
    Seems simple I know, but I've messed around quite a bit and can't seem to make it work. Is this possible??
    Any help would be very much appreciated!!

    And what have you done?
    This can only be done with custom JavaScript programing.
    The value of date type fields are text field and not numeric data. The first task is to convert the dates to a number on some type of number sequence that is a mapping to dates.
    Have you looked at the Acrobat JavaScript API Reference, the MDN JavaScript reference?
    I would use the Acrobat JavaScript util.scand to covert the date string to the number of milliseconds from January 1, 1970 midnight. and then use the getFullYear method of the date object for the year value and add 4 years to that value and then use the setFullYear method to set the year for the date object. Now you can use the util.printd method to format the date object as a date string with a specific format.
    // get the date value, format of date string and years to add;
    var cDate = "11/14/2014"; // date value;
    var cFormat = "mm/dd/yyyy"; // date format;
    var nYears = 4; // years to add;
    // convert date string to date object;
    var oDate = util.scand(cFormat, cDate);
    if(oDate == null) {
    app.alert("Error converting " + cDate + " using format " + cFormat, 0, 1);
    // add years to date object;
    oDate.setFullYear(oDate.getFullYear() + nYears);
    // display result;
    var cExpireyDate = util.printd(cFormat, oDate);
    app.alert("Authorization Date: " + cDate + "." +
    "\nExpire Date: " + cExpireyDate, 3, 0);

  • How to view information based on selection from table

    I currently have a roles table, usersinroles table, and a users table. The users table has a user ID, the roles table has a Role ID, and the usersinroles table has Role ID and user ID as foreign keys. Many users can have many roles. On one page I have the users first name and last name displayed in a read-only table. a user can be selected in which they are directed to a page to view the users details. How can I display on that page the selected user's roles he/she has? I've tried a view but it displays ALL the users and their roles.
    Thanks,
    Adam

    Hi,
    create a bind variable in the users VO and then pass the authenticated username as an argument to the ExecuteWithparams operation. This queries the VO to only show the user you are interested in. The developer guide is a good source of information and inspiration
    http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
    Frank

  • Populating a text field in a form based on selection from a list field?

    Hello,
    I'm using Acrobat 9 on a mac.
    In the list field users choose their hospital name. I then want the address associated with this hospital to populate a text field. Where do I enter the hospital addresses and the "script" (if hospital X then this address)? I've copied this list field and am using it in multiple places on the form by utilizing "global binding" and this is working well.
    Also, can the choices in a list field "drop down" or is the only option available a "click through?"
    Thanks in advance for your help!!

    hi, i've seen this problem before but can't remember what the solution was...
    but just by searching on this forum resulted in this link
    Re: Copy and Paste
    hope it helps

  • Change the source for a media player based on selection from a list.

    All of this is referring to my public facing website in Office 365.
    I put the following code in a content editor web part:
    <audio controls>
      <source src="http://someserver/somefile.mp3" type="audio/mpeg">
    </audio>
    This works just fine. 
    What I want to do, is display a table below this which is a list of mp3's. when the user clicks on one of them the audio plays in the <audio controls>. 
    In other words, I want to change the source of the above player when I click on a link elsewhere in the page.
    Thank you
    Joe Fager

    What you'll need to do is have a javascript onclick/onchange event in the dropdown that runs a set of code that will reset the audio control with the new source. That can be done with jQuery.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Selecting from Combobox with only one item

    I'm populating Comboboxes based on selections from other
    comboboxes. I pick up the selection with the 'change' trigger,
    however when you select the top item or if there is only one item,
    the change route doesn't work. So I tried to use the 'click' and
    even the 'close' triggers instead, but they give me an errors when
    I try to access the companion ArrayCollections which hold the IDs
    for the items in the list (as commented in the code). Any ideas how
    to get this to update with just one selection?
    <!-- The first three comboboxes populate the next one in
    the list in a 'drilldown' approach -->
    <mx:ComboBox minWidth="130" maxWidth="130" id="selectSys"
    dataProvider="{sysOps.lastResult.system.data}"
    change="fillComboBox(selectSys, selectSub, 'subsystem',
    subOps, sysIDs, 1)" rowCount="10" />
    <mx:ComboBox minWidth="130" maxWidth="130" id="selectSub"
    dataProvider="{subOps.lastResult.system.data}"
    change="fillComboBox(selectSub, selectDev, 'devices',
    devOps, subIDs, 2)"/>
    <mx:HTTPService id="sysOps" useProxy="false" method="GET"
    result="sysIDs = sysOps.lastResult.system.id as
    ArrayCollection;"
    fault="mx.core.Application.application.handleFault(event);"
    url="
    http://localhost:8080/TomCustodes/rocket"/>
    <mx:HTTPService id="subOps" useProxy="false" method="GET"
    result="subIDs = subOps.lastResult.system.id as
    ArrayCollection;"
    fault="mx.core.Application.application.handleFault(event);"
    url="
    http://localhost:8080/TomCustodes/rocket"/>
    // fill destination combobox based on selection from src
    combobox
    public function fillComboBox(src:ComboBox, dest:ComboBox,
    type:String,
    serv:HTTPService, idArray:ArrayCollection, element:int) :
    void {
    // choose ID from the associated ID array with the same
    selecetedIndex
    // error occurs as the idArray ArrayCollection comes up as
    null
    var selectedID:String = idArray.getItemAt(src.selectedIndex)
    as String;
    var params:Object = {};
    params[type] = type;
    var arg:String = "arg";
    var argList:Array = new Array();
    if (element > 1) {
    var ind:int = selectSys.selectedIndex;
    var sysName:String = sysIDs.getItemAt(ind) as String;
    argList.push(sysName);
    if (element > 2) {
    ind = selectSub.selectedIndex;
    var subName:String = subIDs.getItemAt(ind) as String;
    argList.push(subName);
    argList.push(selectedID);
    params[arg] = argList;
    serv.send(params);
    Thanks!

    I think the way I would go about that is having a result
    function for the HTTPServices and set your array collections how
    you are. Then after they are set I would check to see if the length
    == 1 and if it does then recall your fillComboBox method for the
    next combo box since there isn't a way for the user to change the
    combo box they might as well have the next one already filled out.
    The other approach you could take is after you set your array
    collection to your result add dummy items via
    myAC.addItemAt({label:"Choose one"}, 0); This will ensure the user
    always has an item to change to.

  • Generate dynamic DataTable for Values selected from SelectManyListBox

    I want to generate a datatable for values selected in a selectManyListBox,
    DataTable will have three columns
    1serial number
    2.values selected from listbox
    3.inputText for entering some data
    Plz guide me how can i do this...
    Thanx in advance!

    Check http://balusc.xs4all.nl/srv/dev-jep-dat.html how to use datatables.

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Trying to get a fourth field to populate based on the selection from three other dropdown menus.

    I would like the Treatment Classification field to populate with a combination of text and numbers based on my selection from three other drop down menus.
    For example:
    If I select "0-No Hurt" in the AHL field, "0-No Hurt in the PHL field, and "Near Miss in the Treatment Choice field, then the Treatment Classification field would populate to "L00NM".
    If I select "2-Moderate Hurt: in the AHL, "4-Fatality" in the PHL field, and "Restricted Work Incident" in the Treatment Choice field, then the Treatment Classifiaction field would populate to "L24RWI".
    If I select "1-Minor Hurt" in the AHL field, "4-Fatality" in the PHL field, and "Medical Treatment Incident" in the Treqatment Choice field, then the Treatment Classifiaction field would populate to "L14MTI".
    Etc, etc, etc.
    I could then fill in the resyt of the script with the required text.
    Not sure how to load my PDF file.
    Thanks,
    Rick

    Do your dropdown list items currently have export values set up? It seems like the value you want to construct is simply concatenating the values of the three dropdowns, and this would be easy if you set the export values of the list items appropriately. For example, the export value for the "0-No Hurt" item would be 0 and for "Near Miss" it would be "NM", etc., so the script could look something like:
    // Get the values of the drop downs, as strings
    var v1 = getField("AHL").valueAsString;
    var v2 = getField("PHL").valueAsString;
    var v3 = getField("Treatment Choices").valueAsString;
    // Set this field's value
    event.value = "L" + v1 + v2 + v3 + "other text goes here."

Maybe you are looking for

  • Adobe Professional 8.0.1 not launching independently

    I have received this error within a few seconds of opening Adobe Acrobat Professional. "Adobe Acrobat 8.0.1 Professional cannot be launched at this time. You must launch atleast one other suite component (such as Adobe Photoshop) before launching Acr

  • Itunes rented movie wont play

    I rented a movie in itunes. It finished downloading and when a press play a message pops up saying "Do you want to start playing the movie Attack the Block? You will have 24 hours to watch this movie." I click play and then a black screen pops up (th

  • Adobe Form Digital Signature using WDA

    Hi, I have implemented Interactive Adobe Form using WDA, with one Signature Field. I need to set and verify the status of the Digital Signature. 1) Is it possible to sign the Adobe form without the user selecting the Digital Id, basically what is nee

  • Help opening a CS5.5 AE project in CS6 & CC?

    Hello everybody, Can anybody help me open an AE CS5.5 project in CS 6 and CC? A couple of years ago, I created an After Effect template with CS5.5, which works great in CS5 (thanks to backwards compatibility) and CS5.5 (of course). The problem is tha

  • App Store closing iTunes unexpectedly.

    I have a 21.5" 2.7 GHz iMac purchased during July 2013, running 10.9. Twice recently, the App Store icon suddenly displays a "1" indicating an update, and when it does it unexpectedly closes iTunes. I click on App Store and there are no updates. The