If? then?

hamzack

New member
Local time
Today, 12:33
Joined
Apr 15, 2005
Messages
8
Hi! I'm a newbie with MS Access.

My blank database consists of customer info, product (A, B & C all priced differently) and schedule of payment (Annual, quarterly and monthly). I've created a general form and subforms for each payment schedule w/ details (e.g. total amount, quarterly/monthly fees, date received...).

When entering data, how do I make the pertinent subform appear once the payment schedule is selected via optionbox or combobox, while disallowing the other 2 subforms from ever appearing for that particular record?
 
You could use a select statement after you have selected which type of payment it is.

If you use a combo box to hold the different payment types after it has been changed you could add something like.

Dim sPaymentOption

sPaymentOption = Combo.Column(1, combo.Value)

Select case sPaymentOption
Case Is = "Weekly"
'Make this subform visible
subform1name.visible = true
case is = "Quarterly"
'Make this subform visible
subform2name.visible = true
case is = "Yearly"
'Make this subform visible
subform3name.visible = true
End Select

This may be what you need.
 
Thank you!

Thanks for your input. I'll try it out and let you know if it works out :)
 

Users who are viewing this thread

Back
Top Bottom