
Searchable database on the web using Access 2002?
Not directly VB related but maybe someone can help.
I'm trying to put together a searchable database on the web using Access
2002 (Office XP). The data is in 2 related tables (One to many
relationship). The Primary Key (PK) in TableA is linked to a Foregin Key
(FK) in TableB.
I have created the page using the data page wizard and the data displays on
the page showing the data in TableA. An expansion button allows the data in
TableB to be seen. Each record in TableA can have several linked (child?)
records in TableB. So far so good........
I need to be able to filter this data. If I set the ServerFilter property
for a field in TableA as follows
<SCRIPT event=onclick for=btnFind language=VBScript>
<!--
MSODSC.RecordsetDefs.Item("TableA").ServerFilter = "Name LIKE 'a%'"
-->
</SCRIPT>
I can display records with Name begining with A from TableA when I click the
Find button. So far so good again.
However I also sometimes need to display records based on the value of a
field in TableB. For example:
Show the records in TableA joined with the records in TableB where
TableB.[Quantity] > 10
If I simply set the ServerFilter property for TableB as follows
<SCRIPT event=onclick for=btnFind language=vbscript>
<!--
MSODSC.RecordsetDefs.Item("TableB").ServerFilter = "Quantity>10"
-->
</SCRIPT>
I get an error message as follows when I click the Find button.
"Syntax error (missing operator) in query expression '(Quantity>10) AND (FK)
= ?'
Any ideas?
Thanks
Joe
PS delete the obvious from my e-mail address if replying to me.