How to code without using VB in access scripting

S

srini

I need to write a tool which can fetch data from text file and place the data
in access table. User is restricting me to not to use VB coding. May i have
suggestions on how to approach ?.. I think macros is alternative but it will
become tough...

Thanks to all
 
A

Albert D. Kallal

srini said:
I need to write a tool which can fetch data from text file and place the
data
in access table. User is restricting me to not to use VB coding. May i
have
suggestions on how to approach ?.. I think macros is alternative but it
will
become tough...

Thanks to all


I'm not sure why they would ask you not to use VBA coding (this is kinda
like asking you to build a dog house without a hammer).

however you may very well be able to use macros, if the text file you desire
to import is a comma delimited, or some type of tab delimted file, then you
can use the transfer text methoed, and a import spec.....

If the text file is a simple standard csv type of file, that a macro should
import this no problem at all.

if you needed events to text processing, and the data is not in a simple
format, than any advance text processing will require you to write some VB
code....
 
E

Emma Hope

Hi Srini,

I don't use VBA for this at all, partially for the same reason as you,
partially for the fact i think the macro is easier. In a macro, you need to
pick the TransferText option and then follow the instructions, if you do one
manually first, you can save the specification and then follow that or make a
table with all the correct field types first and then import into that.

HTH
Emma
 
K

Klatuu

Macros may be easier, but not using any VBA severly limits your ability to
deploy a professional application.

For starters, handling errors is just about impossible.

I consider Macros to be "training wheels". They are useful for hobbyists
who are doing their own applcation for themselfes and as a learning stop gap.
 
E

Emma Hope

Pretty true but some of us our limited by the wonderful companies we work for
and with, no, macros cannot do everything that vba does but sometimes we have
no choice and sometimes, please don;t beat me up for saying so, they can be
easier to work with even for the intermediateto expert programmer, autoexec
for example!
 
K

Klatuu

I will agree with you on one point and that is the use of an Autoexec macro.
I do use that with a few applications that run overnight on a server as
scheduled tasks. You will find that most experts don't use macros other than
an autoexec. Yes, they can be easier to set up, but they are very limited.

In 8 years of using Access and working for multiple companies and clients, I
have never heard of a company that forbids VBA. What is the reason behind
that?

If I were to be asked to write an Access application with no VBA, I wouldn't
take the job.
 
E

Emma Hope

some companies are stupid beyond belief? mainly ignorance and prehistoric
views of IT, i came across a small companies (15 odd people) still using
windows98 before christmas.

my work is 50% excel, 50% access and have been an (almost) expert user of
both for about 5 years, i work with small companies that need the most
awkward things doing with some of the craziest systems i've ever seen, for
example one company with five offices all using remote access to access a
'shared drive', no network or anything, all because the boss thought that was
the only way it could be done. I've also worked with companies that ban vba
because they are scared of it, they think thats how viruses are spread and no
one has ever told them differently, their IT guy is about 100 and still
thinks Fortran is the most up to date programming language and is also the
office handyman, you wouldn't believe some of the things i've come across.

I agree with you, some of these guys shouldn't be touched with a barge pole
but i like a challenge and usually i make few quid in the process ;o) ;o) ;o)
 
K

Klatuu

I understand, I have done a lot of work with small to middle sized companies.
Even in larger companies, there are problems of a different sort. I was at
one place where IT would not allow any applications written in Access at all.
The managment was all Enterprise level people who would use only c++ and SQL
Server or Oracle.

The department I worked with had to have an Access application because IT
(1200 miles away) didn't think the problem was worth writting an app.

It gets better. Each month the would FTP an Excel spreadsheet that we used
as our primary data input. Now, this spreadsheet was the results of an
Oracle stored procedure that output the data. When the made some major
changes to the Enterprise app, The source was going to be done the same way.
I asked whether rather than them FTP the data, could I instead run the
procedure from my app to get the data directly. You would have thought I
said S*** in church.

And of course income does loom large in our image, doesn't it?

As a good consultant, you are obligated to try to educate your clients as to
the best way to solve a problem. You are also obligated to do it their way
if necessary, but document their refusal to cover your back.

PS do yourself a favor - learn VBA.
 
S

srini

Hi Albert, Thanks for your quick reply and suggestion..
Hi Emma/Klattu,
Thanks for sharing your views on this issue. Now i
can convince my user effectively..
Thank you all
 
J

JonWayn

Like Albert Kallal suggested in his reply, TransferText is useful ONLY if the
format of the data in the text file permits it. Otherwise, some kind of
programming language has to be employed. I cant see why the recipient of the
final output would care how it was created.
 
J

JonWayn

Whay bother having a workforce if deployment of the job tasks is only going
to be limited to the expertise of the owner or boss? Not saying you are the
boss now
 

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