Prev: does a window or dialog have a return value when closed
Next: Form Field Auto-Resize - Access 2007
From: Alan on 20 Apr 2010 05:06 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 ???
From: Jeanette Cunningham on 20 Apr 2010 06:51 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 "Alan" <Alan(a)discussions.microsoft.com> wrote in message news:0E53686B-7520-4076-AC38-76011A564792(a)microsoft.com... > 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 ???
From: Alan on 20 Apr 2010 10:13 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 "Jeanette Cunningham" wrote: > 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 > > "Alan" <Alan(a)discussions.microsoft.com> wrote in message > news:0E53686B-7520-4076-AC38-76011A564792(a)microsoft.com... > > 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 ??? > > > . >
From: Alan on 20 Apr 2010 10:14 Scrap that i just had to modify it a bit Me.cbMonth.Enabled = (SalesPeriod = byMonth Or SalesPeriod = BySalesPerson) Thanks for you help "Jeanette Cunningham" wrote: > 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 > > "Alan" <Alan(a)discussions.microsoft.com> wrote in message > news:0E53686B-7520-4076-AC38-76011A564792(a)microsoft.com... > > 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 ??? > > > . >
|
Pages: 1 Prev: does a window or dialog have a return value when closed Next: Form Field Auto-Resize - Access 2007 |