Re: IIf validation rule
- From: chill <chill@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 23:43:07 -0800
HI Doug ...do u think that the expression below can work ?
IIF([date1] BETWEEN #1/2/2006#30/6/2006# , <
Forms!MainFormName!ComboboxName.Column(1),<
Forms!MainFormName!ComboboxName.Column(2))
Thanks
"Douglas J. Steele" wrote:
Where do you want to do this: in VBA, in a query, in a validation rule, or.
somewhere else?
You can only use the Column collection in VBA, nowhere else.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"chill" <chill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:671D805A-F7F2-4683-8A8D-D19B102C0D29@xxxxxxxxxxxxxxxx
Hi all and thanks for your time...
i mean exactly that but how i can combine this with the combo box...?
my combo box has 3 columns 0,1,2 (expanding Tinas idea)and i want the rule
< Forms!MainFormName!ComboboxName.Column(1)
works as [result1] and
<Forms!MainFormName!ComboboxName.Column(2)
as [result2].
do u think its realy possible or a mess ?
"David F Cox" wrote:
Thanks Douglas, I am sometimes too lazy with my "something like" clause,
though this time it was time constraints. I should not be trying to do
this
when pushed for time.
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:%23HaUU8KHHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
IIF([date1] BETWEEN #1/2/2006# AND #06/29/2006# AND [date2] BETWEEN
#7/2/2006# AND
#12/30/2006#, result1,result2])
Dates need to be delimited with # symbols, and regardless of what the
Short Date format has been set to through Regional Settings, you need
to
use mm/dd/yyyy format. (Okay, this second part isn't strictly true: it
can
be an unambigous format such as yyyy-mm-dd or dd mmm yyyy)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"David F Cox" <nospam@xxxxxxxxxx> wrote in message
news:H2%eh.2188$KT2.1310@xxxxxxxxxxxxxxxxxxxxxxx
Do you mean something like:
IIF([date1] BETWEEN 2/1/06 AND 29/06/06 AND [date2] BETWEEN 2/7/06 AND
30/12/06, result1,result2])
actually I would guess that you meant 1/1/06<= [date]<= 30/6/06
And ... There is an Access function Date(). Date is a an Access
reserved
word, you should not use it as a field name [date].
"chill" <chill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7FEB357A-1620-4036-9345-43984FED9665@xxxxxxxxxxxxxxxx
Hello Tina
sorry for bothering u again but yours idea works better and i would
like to
ask you something more...
If i add another column at he combobox (a third one)...is it possible
the
validation rule works with the column(1) when a 1/1/06<[date]<30/6/06
value
and when
1/7/06<[date]<31/12/06 the column (2) take affect? The [data] field
belong
at the subform(B). I think im asking too much but i think its deserve
a
chance. thanks
- Follow-Ups:
- Re: IIf validation rule
- From: Douglas J. Steele
- Re: IIf validation rule
- References:
- Re: IIf validation rule
- From: tina
- Re: IIf validation rule
- From: tina
- Re: IIf validation rule
- From: chill
- Re: IIf validation rule
- From: David F Cox
- Re: IIf validation rule
- From: Douglas J. Steele
- Re: IIf validation rule
- From: David F Cox
- Re: IIf validation rule
- From: chill
- Re: IIf validation rule
- From: Douglas J. Steele
- Re: IIf validation rule
- Prev by Date: Specific printers and print dialogue?
- Next by Date: Re: Specific printers and print dialogue?
- Previous by thread: Re: IIf validation rule
- Next by thread: Re: IIf validation rule
- Index(es):
Relevant Pages
|
Loading