Bob
I've not been able to determine in which circumstances/conditions the
following happens, but I've had to deal with it:
1. An Access function/expression stops working and throws an error
message (not a consistent one).
2. The expression includes the Me. phrase, but it refers to an object
I created, rather than a property or method of the "Me".
3. I change the expression to "Me! something, and it works!
As I said, inconsistently, but I'm guessing that portions of Access got more
rigorous about how "Me." and "Me!" are interpreted.
Your expression uses "Me.", but refers to objects (textboxes) you created.
I'm guessing that you could use:
Me!tbDayWarn1 = Me!tbServiceDate + Me!tbWarn1
provided you format the tbDayWarn1 to display a date value.
Your code would be a bit more readable and self-documenting if you use the
DateAdd(), as suggested elsethread...
Good luck!
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"Bob Vance" <(E-Mail Removed)> wrote in message
news:huq8so$5ij$(E-Mail Removed)...
>
> I have 3 text boxes on my form tbServiceDate(Date) , tbWarn1(Number) ,
> tbDayWarn1 (Date)
> How can I have in form open event tbWarnDate1 will give me the date being
> tbServiceDate plus tbWarn1
> i.e. 12 May 2010 + 7 = 19 May 2010
> Me.tbDayWarn1 = Me.tbServiceDate + Me.tbWarn1
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
>
>
|