VBA vs SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am going to be running 2 queries once a week. The first is an update
query, updating 5 fields in one table, and probably 20-30 records each time.

The second is an append qurey, appending 15 fields in one tabel, about 5-10
records each time.

They are called from a command button, and they will not need to change. I
was wondering would it be better to make 2 queries, or program it in VBA? Are
there any advantages to one or the other? Is one quicker? How will it affect
the database size?

Any suggestions would be very helpful.

Thankyou, James.
 
James,

At this scale (a few tens of records) it would be impossible to notice
performance differences, whichever way you do it. I would opt for SQL
queries in VBA code (as opposed to saved action queries) just so the
users can't get there in an .mde.

HTH,
Nikos
 
Hi,


Use the one that will be easier for you to maintain (to modify in three
months). When the first letter of two words is the same, we look at the
second character to determine which one is lexicographically the first one.
When two alternatives appear the same, for all practical purposes, look for
other criteria, other concerns, to determine which one is to be used.




Hoping it may help,
Vanderghast, Access MVP.
 
Great,

Thankyou for your quick reply.
James

Nikos Yannacopoulos said:
James,

At this scale (a few tens of records) it would be impossible to notice
performance differences, whichever way you do it. I would opt for SQL
queries in VBA code (as opposed to saved action queries) just so the
users can't get there in an .mde.

HTH,
Nikos
 
James,

With fairly up-to-date hardware, you would probably have to go well into
the thousands before you noticed any difference.

Nikos
 
Back
Top