Coding for a command button within a form.

M

Mary A Perez

I am devleoping a database that is based upon our negotiated contracts we
have with Insurance Plans.
The form I have is for the user to choose the plan and product for which
they wish to review the rate information contracted, has code completed that
when a particular plan is chosen in a drop down, then the next drop down will
only show those products that are tied to the particular plan.
My next step is the rate form. I have a command button to go to the rate
form, however, I need the rate form directly associated with the plan and
product chosen to appear upon clicking that command button.
Can anyone help me with this code?
Thank you
 
P

PC Datasheet

Use a query for the record source for your rate form and include the fields
Plan and Product in your query. Set the criteria for Plan to:
Forms!FrmPlanProduct!NameOfPlanCbx
and set the criteria for Product to:
Forms!FrmPlanProduct!NameOfProductCbx

Put the following code in the AfterUpdate event of ProductCbx on
FrmPlanProduct:
DoCmd.OpenForm "FrmRate"
DoCmd.Close acForm, "FrmPlanProduct"
 
M

Mary A Perez

Thanks for your help, however, I need the rate form to open upon the "click"
of the command button named for that form. The reason being is that once the
user chooses the Plan and Product. The user will have more than one command
button to choose from after, such as Current Rates, Admendments, Previous
Effective Rates.
Sorry for not explaining that in my last post.
Can you still help me?
Thank you
 

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