<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=593482416-01072003><FONT face=Arial color=#0000ff size=2>...and
its only Tuesday, good luck with the rest of your week :O)</FONT></SPAN></DIV>
<DIV><SPAN class=593482416-01072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=593482416-01072003><FONT face=Arial color=#0000ff
size=2>mark</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>John
Colby<BR><B>Sent:</B> 01 July 2003 17:18<BR><B>To:</B> Access Developers
discussion and problem solving<BR><B>Subject:</B> RE: [AccessD] weird query
def<BR><BR></FONT></DIV>
<DIV><SPAN class=014141716-01072003><FONT face=Arial color=#0000ff
size=2>Interesting idea, though I doubt that will work either. The
recordset will get its field list from the querydef, which returns no field
list.</FONT></SPAN></DIV>
<P><FONT size=2>John W. Colby<BR>www.colbyconsulting.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Mark
H<BR><B>Sent:</B> Tuesday, July 01, 2003 11:02 AM<BR><B>To:</B> 'Access
Developers discussion and problem solving'<BR><B>Subject:</B> RE: [AccessD]
weird query def<BR><BR></FONT></DIV>
<DIV><SPAN class=062050115-01072003><FONT face=Arial color=#0000ff
size=2>This may be rubbish, but could you create a recordset from the query
and then pick up the field names from that instead?</FONT></SPAN></DIV>
<DIV><SPAN class=062050115-01072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=062050115-01072003><FONT face=Arial color=#0000ff
size=2>Mark</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
accessd-bounces@databaseadvisors.com</FONT> <BR><FONT size=2>[<A
href="mailto:accessd-bounces@databaseadvisors.com">mailto:accessd-bounces@databaseadvisors.com</A>]
On Behalf Of John Colby</FONT> <BR><FONT size=2>Sent: Tuesday, July 01,
2003 9:25 AM</FONT> <BR><FONT size=2>To: Access Developers discussion and
problem solving</FONT> <BR><FONT size=2>Subject: RE: [AccessD] weird query
def</FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BR>
<P><FONT size=2>I've discovered what the problem is. The query in
question uses a function</FONT> <BR><FONT size=2>to append City, State
and zip into a single string. That function is</FONT> <BR><FONT
size=2>defined in code in the FE where the query resides. Without
that field in</FONT> <BR><FONT size=2>the query its fields show up in
the query def. With that function in the</FONT> <BR><FONT
size=2>query, the qureydef thinks it has no fields. This seems
pretty strange to</FONT> <BR><FONT size=2>me since I am using the code
that Gustav provided, opening the FE as a</FONT> <BR><FONT
size=2>database, setting a qdf from its querydefs collection and
manipulating that.</FONT> <BR><FONT size=2>You'd think it could see the
functions inside the database but apparently</FONT> <BR><FONT
size=2>not.</FONT> </P>
<P><FONT size=2>This is a real show stopper since the wizard needs to be
able to grab the</FONT> <BR><FONT size=2>query field names to match
against the bookmarks in the doc being merged.</FONT> </P>
<P><FONT size=2>Bummer!</FONT> </P>
<P><FONT size=2>John W. Colby</FONT> <BR><FONT
size=2>www.colbyconsulting.com</FONT> </P>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
accessd-bounces@databaseadvisors.com</FONT> <BR><FONT size=2>[<A
href="mailto:accessd-bounces@databaseadvisors.com">mailto:accessd-bounces@databaseadvisors.com</A>]On
Behalf Of John Colby</FONT> <BR><FONT size=2>Sent: Monday, June 30, 2003
12:57 PM</FONT> <BR><FONT size=2>To: AccessD</FONT> <BR><FONT
size=2>Subject: [AccessD] weird query def</FONT> </P><BR>
<P><FONT size=2>I have a weird one. I am opening a query def and
reading all of the field</FONT> <BR><FONT size=2>names out into a comma
delimited string to use as a row source for a combo.</FONT> <BR><FONT
size=2>All that stuff works. One of the queries in the db I am
trying to work on</FONT> <BR><FONT size=2>says it has NO fields.
If I execute the query I get data. If I look at the</FONT>
<BR><FONT size=2>querydef itself, I can see the name of the query, the
SQL property, etc. But</FONT> <BR><FONT size=2>ask it for the
.Fields.Count and it comes back 0.</FONT> </P>
<P><FONT size=2>Very unsettling since I need to use this method for
displaying field names</FONT> <BR><FONT size=2>to the user to select to
match against document book marks in a mail merge</FONT> <BR><FONT
size=2>wizard.</FONT> </P>
<P><FONT size=2>I compacted / repaired both the wizard as well as the FE
that actually holds</FONT> <BR><FONT size=2>the query in question.
Two other queries that I am performing this</FONT> <BR><FONT
size=2>operation on work perfectly. One apparently has no
fields.</FONT> </P>
<P><FONT size=2>John W. Colby</FONT> <BR><FONT
size=2>www.colbyconsulting.com</FONT> </P><BR>
<P><FONT size=2>_______________________________________________</FONT>
<BR><FONT size=2>AccessD mailing list</FONT> <BR><FONT
size=2>AccessD@databaseadvisors.com</FONT> <BR><FONT size=2><A
href="http://databaseadvisors.com/mailman/listinfo/accessd"
target=_blank>http://databaseadvisors.com/mailman/listinfo/accessd</A></FONT>
<BR><FONT size=2>Website: <A href="http://www.databaseadvisors.com"
target=_blank>http://www.databaseadvisors.com</A></FONT>
</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>