Select database table to query

A

AIM

I have an Access database with multiple tables that I've set up in
FrontPage to search against.

On my query page, I have a form field (name="formfield") to enter a
value and a dropdown list (name="table") to select the table to run
the query against. So the query has two values, the value entered in
the form field and the value of the table selected from the dropdown
list.

I set up a custom query in FP that looks like this:

SELECT * FROM ::table:: WHERE (field1 = '::formfield::')

However, FP won't return results when the value of table is selected
from the downdown list. If I specify a specific table in place of
::table::, it works fine so I know that everything is working
correctly behind the scenes.

Any ideas on why this won't work?

Andrew Mutch
 
J

Jim Buyens

It's probably because FrontPage can't determine in
advance what columns you're going to query. It needs to
know this at design time.

The solution is to create a different DRW page for each
table, or TO code something yourself in ASP or ASP.NET.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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