Highlighted

Access database connection

Avatar

Guest

03-12-2008

Hello:



I noticed your response on the Adobe web site. I am working with Lifecycle and I am trying to connect to an access database.



I step thru the setup and I get a Connection Successful message.



When I open the form it finds the first record in the table but that is all I get.



I want to be able to put in an employee number on the form and it will auto fill the employee information like First Name and Last Name.



Just like a lookup does.



Is there a way to get this done?



Please help.



Thank you



Jeff Wilson

South Dakota

Replies

Highlighted

Avatar

Guest

03-12-2008

Thank you Paul:



I have done several forms using java scripting and Livecycle ES

I was wondering if I was missing some code that needed to be done.



Thanks again in advance



jeff.wilson@amdacorp.com
Highlighted

pguerett

03-12-2008

There is no place to attach a file so I have no choice but to mail it out as people request it.



Jeff I just sent it
Highlighted

pguerett

03-12-2008

ibwaheemi here is the useful code from the sample (this is FormCalc script):



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

$sourceSet.DataConnection.#command.query.select.nodes.item(0).value = Concat("Select * from Cust_Table where EMPID = '", this.rawValue, "'")

$sourceSet.DataConnection.open()

//xfa.host.messageBox("DataConnection opened")



$sourceSet.DataConnection.close()

//xfa.host.messageBox("DataConnection closed")
Highlighted

_Jenn_Dickens_

11-12-2008

Good Afternoon Paul,



I was wondering if you would be so kind as to send me the sample file also. I was also wondering if, in this sample file, it offers the solution to populate other fields depending on the value in a drop down...



Example...



I have a part name Widget1. The part number for Widget1 is ABC123.



On my order form, I want to be able to pick the part name and have the part number automatically fill in.



Thank you in advance,



Jenn D.



jdickens@dse.net
Highlighted

pguerett

12-12-2008

Is the Part number coming from the DB ....so based on the Part Number picked we have to go back the DB and get the part number?



Is the dropdown being populated by the DB as well?
Highlighted

_Jenn_Dickens_

12-12-2008

Good Morning Paul,



Yes and Yes. I have an Access database that I have all the part numbers, names, rev #s, process owner, etc.



This is a document control (DC) project. I need my DC coordinator to be able to Email Engineering Change Forms to the engineers, have them fill them out and return them. My goal is, if it can be done, to have DC be able to pick a part number and have the corresponding information filled in for them. This ensures consistancy with the names and such. Then, DC will Email it to the Engineer and they will type in additional information specific to the change and submit back to DC. I would like all the field content to go back and get stored in the database.



I have the trial version of Adobe 9 with Livecycle 8.2 and have 28 days left to figure out if I can do this or not before I can put in the purchase req. to have the company buy the upgrade (currently using Adobe 8 with Livecycle 8.0, which doesn't play with Office 2007).



I just need to know if this can all be done or not. I usually can find a snippet, of code, here or there that I can get to work, but I don't have the luxury of time right now. Any guidance you can offer, even if to tell me that it can't be done, would be most appreciated.



Thank you and have yourself a wonderful day!



Jenn D.
Highlighted

_Jenn_Dickens_

12-12-2008

I think I might have found a site that explains how to do what I need to do. I am going to play with it today and see if I can make any headway.



http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/



My biggest problem so far is that I need it to open with the fields blank until I pick the part number. My second biggest problem is having it add a new record to the database and calling the new form number (ECRNumber). This tutorial mentions to pay special attention to the auto-increment field so I'm keeping my fingers crossed. I'll have to let you know how it goes.



Have a great day!



Jenn D.