View Full Version : Inserting externally generated data into fields


jgarcia
08-17-2001, 02:07 PM
I have created a form that calls a custom external program with current data passed as parameters. The external application generates some new data and a bitmap. I have figured out how to display the bitmap on the form after its creation, but I also want to use the newly generated data to fill in a few fields of the current record for future manipulation. I am open to any formatting on the new data that is necessary to accomplish this.

Is there a way to import this new data into a scratch table and insert the fields I want from one into the other? Any ideas?

Liv Manto
08-17-2001, 02:17 PM
Create a Make table Sql, copy the Sql code to a command button?

What external program would the data come from, what format.

jgarcia
08-17-2001, 03:19 PM
The external is a program I wrote to generate a diagram based on the record data. This diagram becomes the bitmap brought back into my form and the extra data generated during its execution is stored as text in a new file.

jwindon
08-17-2001, 04:44 PM
Wow. Fancy stuff.

Anyway, I don't think I know enough about what your doing "exactly", but during the execution of your command to get the data from the external source, you could have to create a new table, have the form your viewing be based off of THAT table of information, and refresh the form records. Maybe run an append the ImportTable to the table the form you are veiwing is based off of.
As for the bitmap. Let that be the last thing added to the form.

Just guessing.

Liv Manto
08-18-2001, 07:43 AM
Create a link to that external data ( if it's not a table, ascii file should be formatted (delimited or fixed width).

Create a query that would pick the data from your newly linked data.

make the query your form's recordset.

jgarcia
08-18-2001, 11:05 PM
I've found a solution with a nice module created by Chuck Grimsby and available at:
http://www.mvps.org/access/modules/mdl0057.htm

It reads a text file line by line and stores it in a variable called myString, which can then be transferred into a field (or whatever manipulation you might need). All I had to do was format my generated file of data so that each line contained data for a separate field.

Thanks for all of the help offered!