Dynamic field in subform 
Author Message
 Dynamic field in subform

Hello,

Here is the scenario:
-User can select to click either Button A or Button B.
-After clicking either button, the program will open aother form with a
subform in it.
-If Button A is clicked, the subform will display selected fields from Table
A.
-If Button B is clicked, the subform will display selected fields from Table
B.
-The main form shares the same information.  The only difference is in the
subform.
-Both Table A and B has seperate link field to the main Table (eg. Table X).

How do I solve this problem using in VBA?  Pls help or any pointer is
appreciated.

Thank you.
Choo.



Sun, 30 Jan 2005 14:59:04 GMT  
 Dynamic field in subform
You can open the form as Hidden, then assign an appropriate Record Source
for the subform, and then make the form Visible.
Or you can pass the button name to another form using an OpenArgs parameter
of DoCmd.OpenForm method, then in the form's On Open event procedure assign
a Record Source depending on that parameter.

Viktor


Quote:
> Hello,

> Here is the scenario:
> -User can select to click either Button A or Button B.
> -After clicking either button, the program will open aother form with a
> subform in it.
> -If Button A is clicked, the subform will display selected fields from
Table
> A.
> -If Button B is clicked, the subform will display selected fields from
Table
> B.
> -The main form shares the same information.  The only difference is in the
> subform.
> -Both Table A and B has seperate link field to the main Table (eg. Table
X).

> How do I solve this problem using in VBA?  Pls help or any pointer is
> appreciated.

> Thank you.
> Choo.



Sun, 30 Jan 2005 22:13:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Referencing a field on a SubForm within a Subform

2. Dynamic sort a subform on a popup form

3. Dynamic amount of fields/field types

4. Transferring focus to a field in a subform

5. updating a field in a form from a subform

6. access fields on subform

7. Block out fields in a subform

8. Change Value in field of subform?

9. Filter By Form Using Subform Fields

10. How to set default for a field in a subform

11. Subform linked by autonumber field in main form

12. Locking field widths on subforms in datasheet view

 

 
Powered by phpBB® Forum Software