DAO v DoCmd etc ?

  • Thread starter Thread starter TonyB
  • Start date Start date
T

TonyB

I'm learning to use Access, and one of the areas I find confusing is the
different methods to handle objects in Access.
Some articles refer to using DoCmd, and it's various methods to manipulate
recordsets/forms, and others use DAO techniques.
Is there anywhere I can find out more about these the merits of the two
approaches ?
I'm mainly interested in learning to use VBA techniques with Access, so is
one method more appropiate when using VBA ?
Regards
Tony
 
My personal opinion:

DoCmd is well worth knowing.
If there's something you can do with the mouse/keyboard, but you want to
make it happen programmatically, DoCmd can probably do it for you.

DAO is a great way of working with groups of objects; I generally use it for
repetitious tasks, and for items (such as specialized recordsets) which are
not as easily accessible using the mouse/keyboard.

That said, there is a good deal of overlap between the two.
If you're serious about learning VBA, though, you really can't get along
with just one.
As a beginner, you may find, as I did, that DoCmd was an easier place to
start, because it's easier to conceptualize from the user interface, but
count on learning both in the long run.

- Turtle
 
DoCmd is often reflective of functionality that can be performed by a macro.
Not to suggest you use macros instead. Conversley, DoCmd is an easy
replacement/enhanced way of using macro type functionality in your VBA code.
 
Back
Top