ACC1x: No Field List When Form Is Based on SQL Statement

ID: Q95566


The information in this article applies to:


SYMPTOMS

You cannot set the RecordSource for a form to a valid SQL statement. When you try to do so, no fields appear in the Field List dialog box.


CAUSE

When you use a SQL statement as the RecordSource for a form, Microsoft Access cannot determine which fields will be in the resulting dynaset.


RESOLUTION

Create a query based on the SQL statement, and then set the RecordSource for the form to the query.


STATUS

This behavior no longer occurs in Microsoft Access version 2.0.


MORE INFORMATION

Steps to Reproduce Behavior


  1. Open the sample database NWIND.MDB.


  2. Open the Category List query in Design view.


  3. From the View menu, choose SQL.


  4. Select the contents of the SQL window. Copy the SQL statement to the Clipboard by pressing CTRL+C.


  5. Choose Cancel to close the SQL dialog box, then close the Category List query.


  6. Open a new unbound form. Paste the SQL statement into the form's RecordSource property by pressing CTRL+V.


  7. From the View menu, choose Field List. Note that no fields are listed.



Keywords          : kbusage FmsProp 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: March 19, 1999