By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

help with unbound fields

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a

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

P: n/a
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.