473,832 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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![TXTTotalhourswo rked]

FRM- TimeSheet Subform is the name of the subform and TXTTtalHourswor ked
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 3784
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!TXTTotalh oursworked

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******** *************@n ews.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![TXTTotalhourswo rked]

FRM- TimeSheet Subform is the name of the subform and TXTTtalHourswor ked
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******** *************@n ews.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
2196
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 = !! in the OnPage Event and sometime this will work and sometime it will not. Is there a better simpler way?
3
6344
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 two times stored in a record (bound fields). This field is called txtDuration. On my footer, I've created another unbound field named txtWeeklyTotal. I've set the Control Source to =Sum(), but this returns a #Name? error. I've tried . and it...
2
1730
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. Eg.
4
2198
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 (one) unbound form, if all the fields are the same for multiple forms populating them with Queries? I have a makeshif menu form with command buttons and I would like to eliminate all the forms and replace them with one unbound form for three...
2
3894
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 DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as...
11
4157
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" fields. When "Contract1" cannot accept further input, the user continues on to "Contract2", ect. I don't want to use memo fields for obvious reasons. Does anyone have an event procedure and code, which could monitor
3
2761
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 (we're sales offices, and I'm doing things such as associate directories, commission calculations, order tracking, etc.). 2003 seems to have a few extra features, but I seem to continually run in to oddities that seem like they SHOULD work, but...
5
1354
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 table to query for analysis. Table Name Field(s) Key Material Material# PK Product Product PK Customer Customer PK Blender Blender PK TestLab Lab...
7
3669
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, Mem, RC, Trans_Type. These are the basic item descriptions. I then have 5 other fields: Add (yes/no), MRR (yes/no), Qty, Unit_Price, Item_Note that come into play when the user chooses which stock item is going to be part of the transaction. User...
0
9795
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10780
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9319
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5623
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3077
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.