A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

conditional macro or code



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2006, 08:28 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.modulesdaovba,microsoft.public.access.reports
00KobeBrian
external usenet poster
 
Posts: 77
Default conditional macro or code

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.


  #2  
Old November 10th, 2006, 08:46 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.modulesdaovba,microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default conditional macro or code

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 he
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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"00KobeBrian" wrote in message
...

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.



  #3  
Old November 13th, 2006, 03:12 AM posted to microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.modulesdaovba,microsoft.public.access.reports
00KobeBrian
external usenet poster
 
Posts: 77
Default conditional macro or code

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


"Allen Browne" wrote in message
...
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 he
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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"00KobeBrian" wrote in message
...

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.





  #4  
Old November 14th, 2006, 01:35 PM posted to microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.access.modulesdaovba,microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default conditional macro or code

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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"00KobeBrian" wrote in message
...
Thanks for the solution. If I want to get the filename in testit() , as an
example, how can I get? Thanks.


"Allen Browne" wrote in message
...
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 he
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.

"00KobeBrian" wrote in message
...

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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.