Making a combo box enable for two case

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

i Have a combo box name Cbmonth

when click a specific case i.e. month sales the box enables,

Me.cbMonth.Enabled = (SalesPeriod = byMonth)

what i need is when we i select Sales person case i need the cbmonth to
enable

i've tried this

me.cbmonth.enabled= (SalesPeriod = byMonth and BySalesPerson) but it doesn't
work

Any ideas anyone ???
 
Write it like this:

me.cbmonth.enabled= (Me.SalesPeriod = "byMonth" Or Me.SalesPeriod =
"BySalesPerson")

Note: I am assuming that SalesPeriod is a bound control on your form and
that it has text data type.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
No The sales period is just a look up for a list box,

i have a list box that got

yearly
monthly
quarterly
Sales Person

which are different reports

so when i click on yearly the yearly combo box enables
when i click on quartery the yearly and quarter box enable an so on

i just need some code so that if i click on monthly or sales person they
enable the yearly combo and the monthly one all i get at the moment is the
yearly one with the sales person
 
Scrap that i just had to modify it a bit

Me.cbMonth.Enabled = (SalesPeriod = byMonth Or SalesPeriod = BySalesPerson)
Thanks for you help
 
Back
Top