giannis said:
No, this is a different question !!!
I want to learn with what way can i
run a SQL clause from Access VB.
What command or function or procedure
can i use for this purpose ?
That depends on what kind of SQL statement (not "clause") it is. If
it's an action query, you might use either DoCmd.RunSQL or
CurrentDb.Execute to execute the query. If it's a select query, you can
open a recordset on it -- for processing records in code -- using
CurrentDb.OpenRecordset, or you can create a temporary QueryDef object
and open a recordset from that. If you want to open a SELECT statement
as a datasheet, though, you'll have to create a permanent, named
QueryDef (a stored query), then use DoCmd.OpenQuery specifying the name
of that QueryDef. You can, of course, delete the QueryDef object when
you're done with it.