SubForm Link (1 Viewer)

c_shutty

New member
Local time
Today, 00:33
Joined
May 17, 2001
Messages
7
I have a form in access 97 with a subform built into it. on the main form there is a combo box with a list of company products and when I select a product I want the subform to only show data that relates to that particular product. The state of the form at the moment is that I can select a product from the list and the subform shows all details for all the products (With out the filter), but when I go to the design of the form and back to the normal form view it works! I find this very strange and can’t find an explanation. On the properties of the subform I have linked the parent and master fields but when I did this I found it strange that on the subform field liner the result showed up as - Show <SQL Statement> for each record in tblProduct using ProductCode. (Shouldn’t it have a table or query name instead of <SQL Statement> )
 

KevinM

Registered User.
Local time
Today, 00:33
Joined
Jun 15, 2000
Messages
719
Add the linked fields manually.

In main form design view highlight the subform and in in the Master Link field put [ComboName]. In the Child link filed put [LinkFieldName]

HTH
 

c_shutty

New member
Local time
Today, 00:33
Joined
May 17, 2001
Messages
7
Thanks Kevin,

I tried that but it still didn't work the only difference is that by going into the design view and back to the normal view the problem still exists where as before this would resolve the problem.
 

Matthew Snook

NW Salmon Database
Local time
Today, 00:33
Joined
Apr 19, 2001
Messages
133
I have been trying to sort a subform, so your post caught my eye. It sounds like the query used to fill the subform is working correctly, but only once. Then it never updates itself. You might try a "requery" on the subform, and put it in the "afterupdate" event of the combo box. There are examples in the Access help. Maybe it will work!

Good Luck,

Matt
 

Users who are viewing this thread

Top Bottom