How should we say it in VBA

  • Thread starter Thread starter Frank Situmorang
  • Start date Start date
F

Frank Situmorang

Hello,

On my option choose, I have this to open form:
Case 2
DoCmd.OpenForm "frmReportFilter4Regions"

Waht should I write for option 3 if I want to run a query name"Add New Form
Labels Language"

Thanks in advance
 
Assuming that "Add New Form Labels Language" is an action query (INSERT
INTO, UPDATE, DELETE, SELECT ... INTO):

CurrentDB.QueryDefs("Add New Form Labels Language").Execute dbFailOnError

If it's just a simple SELECT query, what is your intent with running it?
 
On Fri, 23 Jan 2009 00:35:00 -0800, Frank Situmorang

Don't try to open a query directly. Rather create a form or a report
and base it on this query. Then use DoCmd.OpenForm or
DoCmd.OpenReport.

-Tom.
Microsoft Access MVP
 
Tom,

My intention is to append the data, I already have a query that can append
the table from another database. I just create the church membership, and I
am developping that regional office, for consolidatioan purposes, will be
able to consolidate the data, and I want to make a menu with option choose,
to append the data.

Thanks
 
Back
Top