468,243 Members | 2,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,243 developers. It's quick & easy.

help with unbound fields

I have a unbound field in the subform(for calculating the datediff)
which has the control property ==DateDiff("n",[TimeIn],[TimeOut]).

I have another unbound field in the main form which is for displaying
the datediff from the subform.I have set the controls source =
[FRM-TimeSheet Subform].Form![TXTTotalhoursworked]

FRM- TimeSheet Subform is the name of the subform and TXTTtalHoursworked
is the name of the unbound field in the subform.

When I run the form I still See #Name? in the unbound text field of the
main form.

Can any please suggest whats the mistake is/where the correction is
required?

regards
Dos Lil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
3 3321
I would suspect that somewhere along the line a control is not named what
you think it is...

I tested your code and came up with the same Control Source value for the
unbound control on the main form:
=[FRM-TimeSheet Subform].Form!TXTTotalhoursworked

My first question would be:
#1 - Are your TimeIn and TimeOut controls named that or are they named
something like TXTTimeIn and TXTTimeout?

If that doesn't do it, I've put the database (2 forms, no data) I used to
test on my web site. Download it if you like...
http://www.gargoyleinc.com/Downloads...ss-unbound.zip

Hope that helps.


"Dos Lil" <do****@hotmail.com> wrote in message
news:3f*********************@news.frii.net...
I have a unbound field in the subform(for calculating the datediff)
which has the control property ==DateDiff("n",[TimeIn],[TimeOut]).

I have another unbound field in the main form which is for displaying
the datediff from the subform.I have set the controls source =
[FRM-TimeSheet Subform].Form![TXTTotalhoursworked]

FRM- TimeSheet Subform is the name of the subform and TXTTtalHoursworked
is the name of the unbound field in the subform.

When I run the form I still See #Name? in the unbound text field of the
main form.

Can any please suggest whats the mistake is/where the correction is
required?

regards
Dos Lil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2

Thanks a lot it works fine now.Can you please let me know How I can
format datediff() result so that it shows like

2 hrs 45 Min

Thnaks again

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Dim someTime as Date
Dim newTime as String

someTime = datediff(your previous expression)
newTime = hour(someTime) & " hrs " & minute(someTime) & " Min"
--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

"Dos Lil" <do****@hotmail.com> wrote in message
news:3f*********************@news.frii.net...

Thanks a lot it works fine now.Can you please let me know How I can
format datediff() result so that it shows like

2 hrs 45 Min

Thnaks again

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lumpierbritches | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.