0 Replies Latest reply on Jul 4, 2009 3:48 PM by researchermd

    How to populate multiple text boxes by selecting a value from drop down

    researchermd Level 1

      I apologize in advance if this is redundant, but I have searched this forum relentlessly to no avail. I have a form  connected to an MS Access database. The database is linked to another datadase on an Advantage server. This is dynamic data that has an ODBC driver allowing to link access tables to the Advantage data. Macros on access updates the table being used on this form. The livecycle form connects to the access data via a DSN on a machine that uses acrobat (not reader). This is a physician office, this form should expedite ordering radiology tests on patients. The plan is to use a drop down to select a chart number that will trigger several text boxes to populate dynamically with the corresponding demographic values like name, age, insurance etc.

      Using a data drop down I am able to select the chart number. When I used the example from the office supplies database, so that a button will trigger the event with the following code:



      if (Len(Ltrim(Rtrim(SelectField.rawValue))) > 0) then

      $sourceSet.DataConnection.#command.query.commandType = "text"




      item(0).value = Concat("Select * from OfficeSupplies Where ID = ",

      Ltrim(Rtrim(SelectField.rawValue)) ,"") 


      I recieve a syntax error, despite adjusting quotation since I am using text rather than numeric fields.


      My question is the following:


      Is there a simple javascript that I can use to populate these text boxes (which may be read only but would be better if it allows user input)? Or does anyone recommend an alternative method? I would be happy with a link that solves this problem if someone can provide. I am somewhat familiar with js but open to any suggesstion.




      PS this form could also be linked to a Sequel database if that offers an advantage.