473,382 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 3745
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: N. Graves | last post by:
Hello, Please help me I'm still a newbie. I have an unbound text box on a report that I would like to build a expression to display it on the report. Something like txtboxSearchCriteria = !!...
3
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between...
2
by: Earthling | last post by:
Dear Access Programmers, I can't seem to figure this out. The text boxes that are used to input data via my form are unbound, I want to restrict the user to only put input that is one line. ...
4
by: Lumpierbritches | last post by:
Thank you once again for any and all assistance. I'm building an application that's getting quite bulky due to the number of forms, macros and procedures. I was wondering if there's a way to use 1...
2
by: Zlatko Matić | last post by:
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a...
11
by: wolfesimon | last post by:
I have a form where the user copies a handwritten contract into a text field "Contract1". The contract usually exeeds 255 characters. Therefore I provided "Contract2", "Contract3", and "Contract4"...
3
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality...
5
by: skier500000 | last post by:
I am attempting to build a database with the following tables and fields that will Auto Populate a form when the user is prompted to enter an eight digit number, then save the form data to another...
7
by: HSXWillH | last post by:
I am designing an inventory system and am stuck on a potential problem. I have a table of Stock_Catalog containing the following fields: Stock_ID (random autonumber), Full_Desc, Serial, Auto,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.