| | |
|
|
|
I also have a question about main and subform !! |
| message from =?Utf-8?B?Smlt?= on 3 Jun 2004 |
Hi,
field1 = department
field2 = salesman
subform = displays all orders of the salesman
I will choose field1 first and then use field1 to filter field2 so that I can see salesmans of the particular deaprtment. When a salesman is chosen, all orders belong to this saleman will display in the subform.
Does anyone have come aross this situation?
Thanks
|
| Jeff Boyce replied to =?Utf-8?B?Smlt?= on 3 Jun 2004 |
Jim
Me!SecondComboBox.Requery
to refresh the list displayed by the second combo box. That second combo
box's query needs to "point" to the first combo box as a criterion for the
salesman's department. Use, as a criterion, something like:
Forms!YourFormName!YourFirstComboBoxName
to pass the choice of the first combo box to the query that sets the second.
If your subform is using the appropriate fields for the parent/child
property values, selecting a salesman in the second combo box should give
the subform what it needs to find related records.
|
| =?Utf-8?B?Smlt?= replied to Jeff Boyce on 3 Jun 2004 |
Hi Jeff,
I understand what I meant but I don't know how to do. The department and salesman are 2 combox which have their own control source. The reason is I have to get department name and salesman name from the masters. The current way I am doing is after the department is picked from the list, I use AfterUpdate to compose a query with condition of department and assign to salesman row source. Actually up to this point, the main form is still under expectation. Unfortunately, after the salesman is picked, the suform has changed too. In every subform control, it displays "#Name?". It seems the original query (control source) of the subform has been disappeared.
|
| Jeff Boyce replied to =?Utf-8?B?Smlt?= on 4 Jun 2004 |
Jim
From your description, it sounds like the query underlying your subform
doesn't understand what it's to do. How do you set the subform's source?
|
|
Archived message: I also have a question about main and subform !! (Microsoft Access)