Populate a Form Field from a Query

  • Thread starter Thread starter Frolickin
  • Start date Start date
F

Frolickin

Last weekend I inquired about how to populate a form field
with the DRW. Someone was helpful in pointing out the
steps involved.

I have been struggling, however, with implementing those
instructions.

I set up a form to write to a database table. The form
submits various fields. One of the fields is to be
populated by a field from a query in the same database
(frankly, I would rather these be separate databases, but
I can live with the same).

The problem is that when I use the query, the form field
is not populated.

In playing with this I found that if I use a field from a
table rather than a query, the form field is populated.
So, I tried to restrict the field from the table by using
More Options|Criteria. Unfortunately, that does not
populate the form field either.

So, here I sit, frustrated. Certainly there is a simple
fix which has eluded me for eight days now.

Does anyone have a suggestion?

Fro.
 
Are you sure the query is returning one or more records?

It would help to see the queries that aren't working.
Please post the SQL statements to this thread. I.e.:

o If the custom query is in the DRW, run the wizard and
on page 2, click Custom Query and Edit. Then, copy
the contents of the SQL Statement text box and paste
them here.

o If you defined the query in Access, then start Access,
open the query, choose SQL View from the View menu,
copy the contents of the resulting dialog box, and
paste them here.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Good news. After posting I tried something new. I used
the table, but created a custom query. I have never used
this feature previously, but it returned what I needed.
Thankfully.

I still do not know why the query from the db is not
working. Yes, it does return more than one records . . .
410 in fact. I do not know why it will not populate the
form field, but the custom query on the table did.

Thank you for your help,
Fro.
 
Back
Top