Solved VBA Functions, Command and Properties (1 Viewer)

Kha

Member
Local time
Today, 01:43
Joined
Sep 4, 2022
Messages
57
Hi,
I am trying to know VBA Functions, Commands and Properties that deal with SQL

DoCmd.RunSQL: is for statement for an action query or a data-definition query.
DoCmd.ApplyFilter
Me.RecordSource: property: to specify the source of the data for a form.
Me.Filter: to specify a subset of records to be displayed when a filter is applied to a form, report, query, or table.

Do we have other Functions, Commands and Properties?
 
Last edited:

June7

AWF VIP
Local time
Yesterday, 16:43
Joined
Mar 9, 2014
Messages
5,505
CurrentDb.Execute

WHERE CONDITION argument of OpenForm and OpenReport follow SQL syntax, as does WHERE argument of domain aggregate functions.

Building recordset objects uses SQL.
 
  • Like
Reactions: Kha

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 19:43
Joined
Feb 28, 2001
Messages
27,520
Since you included .RecordSource which is SQL, there is also .RowSource (used for ListBox and ComboBox)

Then, ALL of the Domain Aggregate functions implicitly use SQL though you only see parts of the SQL syntax, similar to .Filter syntax.
 
  • Like
Reactions: Kha

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 20:43
Joined
May 21, 2018
Messages
8,701
FYI Me.filter and Me.Recordsource are not functions. These are properties of a form and they are strings.
There are a few true functions such as the Domain aggregate functions as @The_Doc_Man mentioned

If you are going to go farther in vba using SQL need to learn DAO programming. ADODB if connecting to other non-access data sources.
 
  • Like
Reactions: Kha

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:43
Joined
Feb 19, 2002
Messages
43,774
I find the functions by category to be much more useful. If you don't know the name of a function, the alpha list is useless. The category list gives you an easier way to target into what you need.

Access Functions (by category) (microsoft.com)

Here's an overview of the DAO object model

Here's a link to a useful book but Amazon has a newer version. I included the first link for the picture but the second link is for the book if you want to buy it.


Here is another which is just the DAO Object Model

 
  • Like
Reactions: Kha

Users who are viewing this thread

Top Bottom