conditional macro or code

  • Thread starter Thread starter 00KobeBrian
  • Start date Start date
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.
 
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.
 
Thanks for the solution. If I want to get the filename in testit() , as an
example, how can I get? Thanks.
 
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.
 
Back
Top