Expression Building in VBA Code View (Access 2007)

A

Alex Gordin

I have a suggestion that comes out of using the domain (dlookup, dmax, dmin,
etc.) functions quite a bit in my VBA code.

In form and report view, traditionally a field can be populated by one of a
few things. Usually a) a field straight out of the source for that
form/field, b) an expression built by the expression builder or c) a
function, event, etc.

My suggestion comes out of a bit of laziness. Whenever using the DLookup
function in VBA code, I find myself having to find the table, selecting it so
I can copy and paste the table name exactly so as to avoid mistakes, then
opening up the table in design view so I can find the field names for the
expression and criteria view and often copying and pasting so as to avoid any
typos there.

Sure, the interface guides you so you know what order you need to put
things, but what about creating something similar to (i.e.: slicker) than the
traditional expression builder for those commonly used functions, so I can
have the option of pulling up a window (or something), selecting the
table/query/whatever I want to pull data from, the field I'm looking for, and
the criterion I want to test against (if not what I want the test outcome to
be).

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...97b6&dg=microsoft.public.access.modulesdaovba
 
T

Tim Ferguson

Whenever using the DLookup
function in VBA code, I find myself having to find the table,
selecting it so I can copy and paste the table name exactly so as to
avoid mistakes, then opening up the table in design view so I can find
the field names for the expression and criteria view and often copying
and pasting so as to avoid any typos there.

.... or you could just use sensible, short and legible names for your
database objects...


Tim F
 
A

Alex Gordin

=?Utf-8?B?QWxleCBHb3JkaW4=?= said:
wrote in

.... or you could just use sensible, short and legible names for your
database objects...


Tim F

Which I do. But, this doesn't solve much when you have dozens of tables and
dozens of queries in your database. The other alternative is listing through
multiple pages of printed database schemas, which is actually slower than the
current method). Hence, an expression builder would allow me to do this by
staying on the same VBA editor screen.
 

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