DoCmd.Open.Query in Module! 
Author Message
 DoCmd.Open.Query in Module!

Sam,

The first question is straightforward:

1) Create a public function which returns a value and then
that value is used in the Query, for example,

Public Function GetDate() as Date
  GetDate=Date()
End Function

In the criteria of the field that uses your value simply
call the function, for example

instead of typing in: Date() you would type in GetDate().

Running the query would automatically run the function and
return the function value.

2) I don't know what you are asking for on this one?!

Alastair MacFarlane

Quote:
>-----Original Message-----
>Q1- How do you add criteria to a field of a query when
you
>use the DoCmd.OpenQuery "QueryTest" in a module and then
>view the query?
>Q2- What type of programming commands, in a module, do
you
>use to Query a table and then append to it?
>Thanks,
>Sam>
>.



Sun, 01 Aug 2004 20:49:05 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. module not processing all docmd

2. renaming modules w/o DoCmd

3. Error while using DoCmd.SendObject in a form module

4. Select Queries and DoCmd.RunSQL

5. Can't Pass Query name Tp Report Using Docmd

6. HELP: Inconsistent Results when running multiple queries with DoCmd.OpenQuery

7. DoCmd.RunCommand acCmdSaveRecord DoCmd.RunCommand acCmdSaveRecord

8. Opening reports with filters with docmd.openreport

9. fail to open recordset for a new table created from docmd.copyobject

10. Modules, Modules, Modules

11. Query Class Module

12. Copying a query to Excel in a Module

 

 
Powered by phpBB® Forum Software