using a unbound text box date in query with calculation

B

_Bigred

(access 2000)

On my opening db form [2003Frozen].[Switchboard] I have a unbound text box
that gets it's date from DatePicker.

The thing I want to do is take this date say "2/22/04" and have a query
count it in number of weeks until 6/30/2004 (that is how many weeks happen
between this date & 6/30/04) then multiply this by 40 hours per week. Then
store this calculation in [2003Frozen].[YR1HOURS]

Can someone tell how to set this up?

TIA,
_Bigred
 
M

[MVP] S.Clark

Using the DateDiff() function, you can specify the start and end date, and
also to
display it in Weeks. See the Help file for more info.

e.g. datediff("w", #10/18/70#, date() )


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
B

_Bigred

Thanks Steve (Clark) I appreciate your help, I will see how the journey goes
from here.

Take Care,
_Bigred



[MVP] S.Clark said:
Using the DateDiff() function, you can specify the start and end date, and
also to
display it in Weeks. See the Help file for more info.

e.g. datediff("w", #10/18/70#, date() )


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

_Bigred said:
(access 2000)

On my opening db form [2003Frozen].[Switchboard] I have a unbound text box
that gets it's date from DatePicker.

The thing I want to do is take this date say "2/22/04" and have a query
count it in number of weeks until 6/30/2004 (that is how many weeks happen
between this date & 6/30/04) then multiply this by 40 hours per week. Then
store this calculation in [2003Frozen].[YR1HOURS]

Can someone tell how to set this up?

TIA,
_Bigred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top