filter asks extra parameter when used from macro

B

Bela Fazekas

I had a db in acces 2.0 like this:
two tables t_a (key_a,field_a) and t_b
(key_b,fkey_a,field_b)
where fkey_a link documents from t_b to t_a.

I have a form (f_ab) to display records from table t_a
with the related records embedded from t_b.

I have a form (f_search)to make search on field_b.
There is an input field on this form (f_val) to enter
searcing criteria. The search button linked to the macro
(m_search), which open the display form f_ab using a
query (q_search). This query using SQL JOIN and get the
entered critera from the user filled field (f_val)in
WHERE clause.

It works as supposed in Access 2.0.

Now I should migrate to Access 2002 but it doesn't work
in Access 2002. Access 2002 asks for extra parameter t_b!
field_b !

If I run the query q_search directly (not from macro) it
asks for parameter Forms!f_search!f_val (which is OK) and
after enter the criteria, it display the rigth values.

What should I modify on it to make it work under Access
2002?

Thanks

Bela Fazekas
-----------------------------
the database:
tables:
t_a
key_a field_a
1 A
2 B
...
t_b
key_b fkey_a field_b
1 1 x
2 1 y
3 2 z
...
filter:
q_search:
SELECT DISTINCTROW t_a.*, t_b.*, t_b.field_b
FROM t_b INNER JOIN t_a ON t_b.fkey_a = t_a.key_a
WHERE ((t_b.field_b=[Forms]![f_search]![f_val]));
 

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