473,387 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VBA-help

Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)

2. Empty the ImportErrors Table

3. Read external file names and put it into a "macrovariable"

4. Run external program for decryption with the filenames from step 2

5. Save to another subdirectory

6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)

7. Save loaded files to another subdirr

8. Count the number of files addes

9. Count the number of records added

10. Manage/trap different kind of errors

Thank you,

/Gunnar
Nov 12 '05 #1
2 2173
Gunnar Petersson wrote:
Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)
Will ShellExecute work?
2. Empty the ImportErrors Table
See delete queries in help.
3. Read external file names and put it into a "macrovariable"
See the word Dir in help
4. Run external program for decryption with the filenames from step 2
See ShellExecute. Goto http://www.mvps.org, AccessWeb, APIs to see how
to shell execute using API calls if you want to open a file by association.
5. Save to another subdirectory
See FileCopy
6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)
See Dir to get filenames
7. Save loaded files to another subdirr
FileCopy?
8. Count the number of files addes
cnt = cnt + 1?

9. Count the number of records added
Will you use an action query called by Execute? Then see
RecordsAffected. Otherwise get a beginning count, run query, get ending
count and subtract.

10. Manage/trap different kind of errors
On Error GoTo Err_routine

Err_Routine:
select case err.number
case 123
...code
case 456
...code
case else
end select
Thank you,

/Gunnar


Nov 12 '05 #2
Gunnar Petersson wrote:
Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)
Will ShellExecute work?
2. Empty the ImportErrors Table
See delete queries in help.
3. Read external file names and put it into a "macrovariable"
See the word Dir in help
4. Run external program for decryption with the filenames from step 2
See ShellExecute. Goto http://www.mvps.org, AccessWeb, APIs to see how
to shell execute using API calls if you want to open a file by association.
5. Save to another subdirectory
See FileCopy
6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)
See Dir to get filenames
7. Save loaded files to another subdirr
FileCopy?
8. Count the number of files addes
cnt = cnt + 1?

9. Count the number of records added
Will you use an action query called by Execute? Then see
RecordsAffected. Otherwise get a beginning count, run query, get ending
count and subtract.

10. Manage/trap different kind of errors
On Error GoTo Err_routine

Err_Routine:
select case err.number
case 123
...code
case 456
...code
case else
end select
Thank you,

/Gunnar


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: guy lateur | last post by:
Hi all, I am trying to write some code (macro's, if you like) to glue together our Office applications (mainly Word, Excel and Outlook). We have a lot of different projects going on...
1
by: Igor Mendizabal | last post by:
Hello We have a VB6 application that integrates an VBA IDE from which the final user can make modifications. We want to pass the application to VB.NET, and the first step, before rethinking...
22
by: Illya Havsiyevych | last post by:
Hello How easily parse VB/VBA code by VB/VBA code ? Is any ready solutions ? Thank's, illya
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
6
by: Ieuan | last post by:
Hello all and Happy New Year, I've been having this problem for some time and thought I'd try to see if anyone else out there has had the same problem or can give a little help. I'm using a...
1
by: Igor Mendizabal | last post by:
Hello We have a VB6 application that integrates an VBA IDE from which the final user can make modifications. We want to pass the application to VB.NET, and the first step, before rethinking...
16
by: Sathyaish | last post by:
I am expecting a VBA code module in one of the VBA apps, but much to my astonishment, I don't seem to find my way through it. It seems like I am looking at a fully compiled binary. I have an MDB...
7
by: fcolon75 | last post by:
I'm an experienced Access user, but very new to coding VBA in Access. I'd like to do the following: 1) Develop a basic query in the query designer. 2) Call that query from a VBA script 3)...
7
by: =?Utf-8?B?Z2s=?= | last post by:
I wonder how to export a call in vba from unmanaged vc++ Usually i can export function ...with stdcall In vb.net I can do that with com class. I would like to instantiate an object from vba. ie...
3
MMcCarthy
by: MMcCarthy | last post by:
Although some users find Macros simple and easy to use, there are some major limitations to using them. Although you can use macros to perform tasks, there is limited control on when and how those...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.