Re: Using Dates in If Then statements in Continuous Forms
- From: bamrak@xxxxxxxxx
- Date: 7 Feb 2007 10:05:35 -0800
On Feb 7, 11:31 am, "Douglas J. Steele"
<NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote:
You have no choice but to use Conditional Formatting.
While it may appear as though you've got, say, 200 text boxes named
txtAssigned on your form, in actual fact you've got one text box, repeated
200 times. Any change you make to the properties of one text box affects
them all.
--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)
<bam...@xxxxxxxxx> wrote in message
news:1170864988.287221.231390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 7, 10:42 am, Stefan Hoffmann <stefan.hoffm...@xxxxxxxxxx>
wrote:
hi,
bam...@xxxxxxxxx wrote:
If I take out 'And DateDiff("d", Dt, Me.txtAssigned) > 60' the If
statement completes where the other parts are true.
Try it with switching the dates:
DateDiff("d", CDate(Me.txtAssigned), Dt)
Use the CDate() function to ensure to use a date.
mfG
--> stefan <--
still nothing. if you use msgbox (DateDiff("d", Dt, Me.txtAssigned))
it returns the same as DateDiff("d", CDate(Me.txtAssigned), Dt),
which to me means they are correctly executing the math part, but it
seems to be unable to traverse the rows. I'm really at a loss to why
it fails once the date logic is added.
I guess my confusion comes from the following code working, whereas it
stops working when using the date in the if clause.
"If Me.txtSTATUS = "OPEN" And IsNull(Me.txtNote) And txtRej_Cd =
"PENDING" Then
txtActionDt.Value = Date
Me.txtNote.Value = "AutoClose"
me.txtAction.Value = "CLS"
End If"
Thank you for the replies and the help however.
.
- References:
- Using Dates in If Then statements in Continuous Forms
- From: bamrak
- Re: Using Dates in If Then statements in Continuous Forms
- From: Stefan Hoffmann
- Re: Using Dates in If Then statements in Continuous Forms
- From: bamrak
- Re: Using Dates in If Then statements in Continuous Forms
- From: Stefan Hoffmann
- Re: Using Dates in If Then statements in Continuous Forms
- From: bamrak
- Re: Using Dates in If Then statements in Continuous Forms
- From: Douglas J. Steele
- Using Dates in If Then statements in Continuous Forms
- Prev by Date: Re: set focus enabled
- Next by Date: Re: set focus enabled
- Previous by thread: Re: Using Dates in If Then statements in Continuous Forms
- Next by thread: Re: Control Visibility
- Index(es):
Relevant Pages
|