conditional macro or code

0

00KobeBrian

Hi,

I want to use a macro or code to do the actions as: Open a open
file dialogue, select the file, then transfer that file to a table, open an
access form based on that table and change some data in the table, finally
transfer that table to another file. Can anyone please advise me how to
accomplish this with conditional macro or module code? Thanks.
 
A

Allen Browne

You cannot record macros in Access the way you can in Excel or Word, so if
you have no experience with writing VBA code, this task will be beyond you.

If you want the user to select the file, the code to open the FileOpen
dialog is here:
http://www.mvps.org/access/api/api0001.htm

To perform the import, you need TransferText, TransferSpreadsheet, or
TransferDatabase, depending on the kind of file you want to import.

To open a form so the user can edit it, use OpenForm.

To export the data out again, use the appropriate Transferxxx method from
the 3 above.
 
0

00KobeBrian

Thanks for the solution. If I want to get the filename in testit() , as an
example, how can I get? Thanks.
 
A

Allen Browne

The first link in the previous reply gives you the code you need to pop up
the File Open dialog and ask the user for a file name.
 

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