Combo box select qry won't save in Row Source

B

bws93222

I have create a form and added a combo box. But when I goto the
PropertySheet/Row-Source to build the select query to create the drop-down
list, it won't save--even tho I click "save". If I explicitly "save as" and
name the query so that it appears in my objects list, then it will work--but
is this necessary?
When I use the lookup wizard to do create a combo with select query, no
associated named query appears in my objects list--instead the row source
simple shows the whole query like this: "SELECT tblCustomers.[Customer_ID],
[tblCustomers].[CustomerName] FROM tblCustomers ORDER BY [CustomerName];".
This is what I want to emulate and save manually but can't. Suggestions? thx
 
B

bws93222

<<...If you click No, the SELECT command will be stored in the RowSource
property.>> That is what's not happening for me--the RowSource remains
blank. However, the workaround you offered to manually enter the select
statement directly in the RowSource field did save and it did work. But
since you pointed out that it is better to save and name the query, that is
what I'll do from now on. Thx for your help.
--
bws93222


MGFoster said:
bws93222 said:
I have create a form and added a combo box. But when I goto the
PropertySheet/Row-Source to build the select query to create the drop-down
list, it won't save--even tho I click "save". If I explicitly "save as" and
name the query so that it appears in my objects list, then it will work--but
is this necessary?
When I use the lookup wizard to do create a combo with select query, no
associated named query appears in my objects list--instead the row source
simple shows the whole query like this: "SELECT tblCustomers.[Customer_ID],
[tblCustomers].[CustomerName] FROM tblCustomers ORDER BY [CustomerName];".
This is what I want to emulate and save manually but can't. Suggestions? thx

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You just type the SELECT command into the RowSource property. When you
save the form everything on the form, including the ComboBox's RowSource
property are saved. The SELECT command is not saved as a QueryDef. To
do that you have to click the button to the right of the RowSource
property (when it has the focus). That will take you to the query
design grid view. You can use the design grid to create your query or
switch to SQL View and type in the SELECT command. When you close the
QueryDef you should be asked if you want to save the query. If you
click Yes you will be prompted for a query name. That name will be
stored in the ComboBox's RowSource property. If you click No the SELECT
command will be stored in the RowSource property. It's better to save
the QueryDef than to store the SELECT command in the RowSource property.

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSeO4AIechKqOuFEgEQJ/HgCgwBthoMpT6MJ1VJA/u19TzmNVqIUAniuJ
HUjddtRwDv/ipyCoJpfWb7sN
=7dEE
-----END PGP SIGNATURE-----
 

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