Column names for customized query and merge
- From: christianlott1@xxxxxxxxx
- Date: 23 May 2007 07:23:33 -0700
I want to provide users with an interface to create a custom merge
(all in Access, not Word). User will put in a set of brackets ("<>")
in a memo field and when they click the merge button it will grab the
fields listed in a tabular subform and merge it with their memo text.
I was able to retrieve the code to list the column names of a table.
I constructed the code to iterate the tabular subform rows and replace
the brackets with the row text in order.
What I need now is to able to allow the user to specify the column
they wish to lookup. Once the column is retrieved, in the next column
will be listed the corresponding value from the correct record.
----------
Example:
My name is <> from <>.
-----------
In a combo box I would select the table or query. Beneath that combo
box would be a tabular subform with a combo box and text box. Combo
box would be populated with the selected table or query's column
names. When the column name is selected, the corresponding field in
the table/query would appear in the adjacent text box.
I then have code to iterate over the set, merging them in order into
the memo text.
So in the example above the table would be selected:
tblPerson
and the column names would be selected in the tabular subform combo
box:
Name
State
and alongside the column names the text box would auto populate:
Name Jim
State Texas
Why go through this trouble? The Word merge code that I've found is
WAY too slow.
--
Christian
.
- Follow-Ups:
- Re: Column names for customized query and merge
- From: Tom van Stiphout
- Re: Column names for customized query and merge
- Prev by Date: Re: Need vb codes for auto backup of backends
- Next by Date: Re: Need vb codes for auto backup of backends
- Previous by thread: Changing Format of Access Field via Query?
- Next by thread: Re: Column names for customized query and merge
- Index(es):
Loading