CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Lookup in Search Form

Print topic Send  topic

Author Message
Anthony Trotter
Posted: 05/31/2001, 2:12 AM

I am attemping to use a lookup in a search form with no success. I
want to display only those countries that users (websites) are in.
This is a one field search form. I am trying to avoid our visitors
seeing "no records found".

I am far from an SQL wiz, so I generated the lookup in Access and
placed it in the "Form Properties / List / Lookup SQL" section of the
listbox form field. The rest of the lookup boxes are blank. Also my
form fields "Field" is blank with now db table selected.

Here is the SQL I am using:
------------------------------------------------
SELECT DISTINCTROW lookup_countries.country_desc
FROM lookup_countries INNER JOIN websites ON
lookup_countries.country_id = websites.country_id;
------------------------------------------------

Is my SQL the problem?

Side note: I have to say, as easy as the search forms look, they are
probably the most confusing pages to make from scratch in CC. It's
not difficult to create them with the Page Wizard, but I would still
like better documentation to know what boxes to check and populate,
etc.

Thanks again.

Anthony


Hellen
Posted: 05/31/2001, 3:56 AM

Anthony,
when you use custom sql in in the "Form Properties / List / Lookup SQL" sql
statement should select not only lookup field, but also primary key. So your
SQL statement should be:
SELECT DISTINCTROW lookup_countries.country_id,
lookup_countries.country_desc
FROM lookup_countries INNER JOIN websites ON
lookup_countries.country_id = websites.country_id

When db table is selected for the form table fields can be selected in
"Field" listboxes.

Regards,
CC Support

"Anthony Trotter" <support@worldnetcity.com> wrote in message
news:9f51tq$quu$1@mail.tankhill.com...
> I am attemping to use a lookup in a search form with no success. I
> want to display only those countries that users (websites) are in.
> This is a one field search form. I am trying to avoid our visitors
> seeing "no records found".
>
> I am far from an SQL wiz, so I generated the lookup in Access and
> placed it in the "Form Properties / List / Lookup SQL" section of the
> listbox form field. The rest of the lookup boxes are blank. Also my
> form fields "Field" is blank with now db table selected.
>
> Here is the SQL I am using:
> ------------------------------------------------
> SELECT DISTINCTROW lookup_countries.country_desc
> FROM lookup_countries INNER JOIN websites ON
> lookup_countries.country_id = websites.country_id;
> ------------------------------------------------
>
> Is my SQL the problem?
>
> Side note: I have to say, as easy as the search forms look, they are
> probably the most confusing pages to make from scratch in CC. It's
> not difficult to create them with the Page Wizard, but I would still
> like better documentation to know what boxes to check and populate,
> etc.
>
> Thanks again.
>
> Anthony
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.