DRananahan
Registered User.
- Local time
- Today, 15:20
- Joined
- Jul 24, 2000
- Messages
- 14
I have a question regarding using VBA to open a form.....
I have an unbound form that contains a combo box with several different types of collateral (i.e. Real Estate, Titled Vehicles, UCC collateral, Life Insurance, Stock/Negotiables, etc.) The lookup table has 3 columns (PrimaryKey, CollType, FormAssociation) For each type of collateral, there is different information to be entered to complete the transaction. I have set up tables for each type along with a form for each table.
Is there a way rather than assigning a number value to each collateral type then writing code using the if statement to open the form i.e.:
If CollType = 1 then
DoCmd.OpenForm "frmREColl"
ElseIf CollType = 2 then
DoCmd.OpenForm "frmTitledVeh"
ElseIf ......
I would rather have
DoCmd.OpenForm "form association name"
I would appreciate any help with this.
Thank you,
doug
I have an unbound form that contains a combo box with several different types of collateral (i.e. Real Estate, Titled Vehicles, UCC collateral, Life Insurance, Stock/Negotiables, etc.) The lookup table has 3 columns (PrimaryKey, CollType, FormAssociation) For each type of collateral, there is different information to be entered to complete the transaction. I have set up tables for each type along with a form for each table.
Is there a way rather than assigning a number value to each collateral type then writing code using the if statement to open the form i.e.:
If CollType = 1 then
DoCmd.OpenForm "frmREColl"
ElseIf CollType = 2 then
DoCmd.OpenForm "frmTitledVeh"
ElseIf ......
I would rather have
DoCmd.OpenForm "form association name"
I would appreciate any help with this.
Thank you,
doug