Automating Table, Form & Query

  • Thread starter Cipher via AccessMonster.com
  • Start date
C

Cipher via AccessMonster.com

The Problem: I have External Text Files (ETF) that are read into a table.
Becaues the Forms have to manipulate the data I decided (on the advice of
Microsoft) to INDEX the records with a RecordID in Field1 of the Table. After
the customer has edited this data, it needs to be exported back to the
original ETF with no modifications to the structure of the file. Because
Microsoft decided that they would not allow anybody to export the fields they
needed (I do not want the RecordID exported to the ETF), I have to create a
Query and then select the fields I need (all of the original fields except
the RecordID field-thank you John for this tip), this way I can keep the
original structure of the ETF the same.

My Solution: In order for my customer to not pull his hair out as so many
things need to be done, I would like to make it simple for him as follows:

1) Place appropriate Command Buttons on the form that will
a) Reload the Table with the ETF data
b) Update the Form
c) Place a Command Button on the Form tjat will RUN the query and EXPORT the
query back into the ETF.

Now I know that you can do anything with VBA, but the Tables, Forms and
Queries are all there...all I need to do is force an IMPORT and EXPORT of the
data back to the ETF. I already have a "Saved Imports" & "Saved Exports"
proceedure saved in the Database, all I need to do is activate them

I wuld really like to NOT do all this in VBA if posible. Is there a way I can
create a BUTTON that will do all this for me so I can place it on the Form.
Would MACROS work here?

Thanks all.
 
D

Dorian

Yes, you can run a macro from a command button.
However, I strongly advise using VBA so you have the error-handling
capability of VBA available.
Importing and exporting files is an error-prone process.
From what you have stated I don't see any reason why Access needs an index
for the data or even an id field. Unless you are going to sort the data or
join it with other tables there is no purpose to it.

-Dorian
 
C

Cipher via AccessMonster.com

I need to analyse the data in the ETF and I am using 'StrOne = "SELECT * FROM
Inject_Cycle " & "WHERE ID=" & Record_Number'. After analyzing the data, I
increment the Record_Number and repeat the process until I reach an EOF
condition.

I know I can run a macro froma command button, but there is NO macro to run a
'Saved Imports' Operation. Ideally, ALL of the Tables will execute a new
IMPORT each time the table is loaded, but to have a Command Button on the
form to "Load Data" would work fine.

My problem is finding an explanation of ALL the posibilities in VBA for Acess.
I now have eleven books and not one of the lists all of the commands and
functions. So, I am asking this Forum for help.

Here is what I need:
1) I cannot find a Macro that will re-Import ETF data into a Table..Is there
one? If yes, where is it.
2) What is the function in VBA to Import Data from ETF's into a Table.
3) If YOU were to build a Form and place a Command Button on it, what
programming/macros/functions would you use to re-import ETF data into a table.


Thanks
Yes, you can run a macro from a command button.
However, I strongly advise using VBA so you have the error-handling
capability of VBA available.
Importing and exporting files is an error-prone process.
From what you have stated I don't see any reason why Access needs an index
for the data or even an id field. Unless you are going to sort the data or
join it with other tables there is no purpose to it.

-Dorian
The Problem: I have External Text Files (ETF) that are read into a table.
Becaues the Forms have to manipulate the data I decided (on the advice of
[quoted text clipped - 26 lines]
Thanks all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top