Macro for running text in Memo fields as SQL

R

Rhysickle

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
 
J

Joseph R. Pottschmidt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top