Macro for running text in Memo fields as SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with various unbound tick boxes & combo boxes. I want to build
a macro which runs a different SQL query depending on what state the tick
boxes and combo boxes are in.

The various combinations of tick boxes and selections in the combo boxes is
potentially huge, and I don't really want to clutter my database with dozens
of queries. Is there a way to set up a table where the SQL code is entered in
a memo field, and where a macro can look up a record, treat the text string
in th ememo field as SQL and run it as a query.

Thanks for any help

Rhys
 
Dear Rhysickle:

Here is my suggestion, if you want to have all those unbounded fields
and check boxes create a SQL string, then have some VBA code that reads
the status of each of these checkboxes and such and build your sql
string from that.

Not know more specifics, that is what I can tell you so far.

Joe P.


-----Original Message-----
From: Rhysickle [mailto:[email protected]]
Posted At: Monday, June 19, 2006 8:35 AM
Posted To: microsoft.public.access.macros
Conversation: Macro for running text in Memo fields as SQL
Subject: Macro for running text in Memo fields as SQL

I have a form with various unbound tick boxes & combo boxes. I want to
build
a macro which runs a different SQL query depending on what state the
tick
boxes and combo boxes are in.

The various combinations of tick boxes and selections in the combo boxes
is
potentially huge, and I don't really want to clutter my database with
dozens
of queries. Is there a way to set up a table where the SQL code is
entered in
a memo field, and where a macro can look up a record, treat the text
string
in th ememo field as SQL and run it as a query.

Thanks for any help

Rhys
 
Back
Top