Text Box Control Source???

ccflyer

Registered User.
Local time
Today, 02:26
Joined
Aug 12, 2005
Messages
90
Hi everyone,

This is a very simple problem, and it seems to me like it should work but it doesn't. On my form, I have a field called [mindate], which looks up the earliest date from a table. I also have a field called [maxdate] which looks up the latest date in my table. These both work great. My third text box [difference] is supposed to find the difference between the two above dates in days, but it doesn't work.:eek: The control source of this [difference] text box is this:

Code:
=DateDiff('d',[mindate],[maxdate])

Any suggestions?
Chris
 
ccflyer said:
Hi everyone,
On my form, I have a field called [mindate], which looks up the earliest date from a table. this:

Code:
=DateDiff('d',[mindate],[maxdate])

Any suggestions?
Chris

Try using the name of your textbox

like me.textbox1.value
 
OK, I tried this, but still no luck.

Code:
=DateDiff('d',[me.mindate.value],[me.maxdate.value])

Thanks,
Chris
 
ccflyer said:
Hi everyone,

I have a field called [mindate], which looks up the earliest date from a table. I also have a field called [maxdate] which looks up the latest date in my table. Chris


Do you mean mindate is a result of a query that looks for the earliest date?
 
Wow!!!! I deleted the current control source, and re-typed it and it magically works:eek: I have no idea why it works now, but it does. To answer your question, this text box looks at the [mindate] and [maxdate] text boxes which look up the lowest and highest dates from a table.

Thanks for the help,
-Chris
 

Users who are viewing this thread

Back
Top Bottom