Unbound Field Calculation
Jul 31, 2007
Below is the code I have written to calculate the arrival and departure times based on the users input on time in the air (tripETE) and on the ground (tripGT). The arrival (txtArrTimeZulu) and departure (txtDepTimeZulu) times are unbound boxes since there is no need to save the information. My problem is when the next leg's ground or air times are entered, it updates the arrival and departure times for all the records to that value; overwritting the previous legs times. What am i missing here? Do i need to open a recordset when opening the form or when entering "TripETE" and "TripGT"?....
View Replies
ADVERTISEMENT
Jul 25, 2013
I am running in to a brick wall with this. I have an unbound text box with the control source set to =IIF([text42]=0,0,[text42]/[text44])*100 and in continues to return a #name? error.
I am not sure how to get this expression to work. I have even tried to put =[text42]/[text44] and I still get the #name? error.
View 3 Replies
View Related
Jan 30, 2015
To make it simple, I have a list of contact names and their email. I want to have a form with no control source and have 2 simple drop down boxes for their Name and their Email. What I would like to happen is the user choose a name from the drop down in field 1 and then the field below auto-populate their email in field 2. I understand I can use conditional IF/THEN and list out each email, but the contact list is ever changing, so I want to first drop down to link to the TblContacts, have the user pick the name from the list and then have the 2nd field autopopulate from that same TblContacts with their email respective to the Name entered in field 1. My form has two field [Traveler] and [Email]...The tblContacts two fields are [Name] and [Email]
Code:
DLookup("[Email]", "tblContact", "[Name] = [frmEmail]![Traveler]")
View 5 Replies
View Related
Sep 17, 2013
I have an unbound text box with the following control source:
="The scores below are based on the number of total evaluations (" & Sum([TitleIDCt]) & ")."
I set the formatting of the control to Standard. It reads:
The scores below are based on the number of total evaluations (1718).
I need the comma to show up so it reads like this:
The scores below are based on the number of total evaluations (1,718).
Can this be done?
View 6 Replies
View Related
Nov 12, 2014
Got a database that is working great
1 table - Employees
2 Queries
1) - QEmployees Extended
2) - QyrsEmp
2 Forms
1) - Employee Details (source control is "QEmployees Extended")
2) - Employee List (source control is "QEmployees Extended")
in Form "Employee Details" there is field named "HireDate" this field is also found in the table (records) "Employees" and "QEmployees Extended".When Form "Employee Details" is ran the "HireDate" appears as it should in the "HireDate" text box.
What I want to do is add a unbound text box to Form "Employee Details" named "txtYrsEmp" (Years Employed). and perform a calculation that will take the "HireDate" (date) and compare it to "Todays Date" and come up with the number of years employed rounded by 2 and show this result in the unbound text box called "txtYrsEmp"
Now I did a Qurey just to see if I could calculate what I wanted- "QYrsEmp" where in the first column I entered in the Field row (top) Expr1: EmployeeID from table Employee and in the second column I entered in the Field row (top) txtYrsEmp: Round(DateDiff("d"'[HireDate],NOW()/365.25,2))
Now the query returns the exact results I want so I know the calculation is possible at least here in the query.
View 7 Replies
View Related
Feb 26, 2006
in my form I created an unbound field with a requested combination, now how can I put those in a table field.
in other words, how can I send the content of a form's unbound field to a field in the table?
your help is very appreciated.
Regards,
CS.
View 3 Replies
View Related
Nov 5, 2012
I've created a data entry form w/ 7 fields.... [f1], [f2], [f3], [f4], [f5], [f6] are bound to a table. While [f7] is unbound and has Nz function.
Now, the value of [f7] is the summation of [f1] to [f5], i want that what ever value is generated by [f7] will be stored on [f6] in both forms and table...
View 1 Replies
View Related
Nov 8, 2004
KTYPE=text; EXPIRATION_DATE=date/time; OVERAGE=date/time
im doing a report based on a query (which has a few fields, including KTYPE, EXPIRATION_DATE, OVERAGE). im trying to determine the OVERAGE based on the following conditions:
here are the conditions:
if KTYPE="PO", then OVERAGE:=(EXPIRATION_DATE + 6 months)
ie.. KTYPE=PO, OVERAGE:=(01/04/2004 + 6 months) = 07/04/2004
if KTYPE="IAA", then OVERAGE:=(EXPIRATION_DATE + 20 months)
if KTYPE="FA", then OVERAGE:=(EXPIRATION_DATE + 12 months)
and so on and so forth.
I'm very new to Access. What formulas do I use and do I put the formula in the query or the report.
Please help. thanks in advance
View 2 Replies
View Related
Nov 17, 2014
I have a continuous subform that draws information from a table (Calls). This subform shows a variety of fields among them one called "ResolutionDetails".
This field can have various values such as "In process, Completed" Initial contacts", Repairing,..."
I have been asked to simplify this subform by hiding this field and adding another one (not to the table, just to the continuous form) that shows only two possible values: "In Process" or "Completed"
So let's say I create a new unbound field in this continuous form; How can I do so this field checks the value of "ResolutionDetails" and it shows one of the two options? My guess is that I need to give this new field a default value of "In process" and have it change to "Completed" when "ResolutionDetails" value is "Completed"
View 2 Replies
View Related
Nov 21, 2005
Hi,
I have a cross tab query that has field names 6, 7, 8, 9, 10 representing months and a relevance date field with a date.
I have a form and from that form i need to get the value of the last three months from a relevance date field.
I.e relevance may be 01/10/2005 so i would need 3 labels, (labels are already made, but there source needs to be) 10, 9, 8. But the next row may have a relevance date of 01/08/2005 in which case it would be 8,7,6.
Any ideas on how i can do this.
Thanks Adam
View 3 Replies
View Related
Oct 19, 2004
I have a form (frmMain) that references a table (tblMain). The table contains five fields (MonInv, TueInv, WedInv, ThuInv, and FriInv).
I have an unbound field (Text2) which calculates the totals of those fields.
Here's the equation in the control source:
=(MonInv+TueInv+WedInv+ThuInv+FriInv)
My problem is Text2 displays #Name.
Is something wrong with the equation.
View 3 Replies
View Related
Aug 12, 2005
Having some problems with a calculated field on a form. The field came from my table but I typed in the calculation (=[cost_price]+[sale_price]) and it works fine but it wont save to my table so when I run a repot off it doesnt have any of the calculated values because they arent saved in my table??? Can anyone help?
Thanks
Tom
View 2 Replies
View Related
Feb 23, 2007
How do I get a field to calculate this formula?
I want a script to find the precise current date and from another field find a number and add it to the current date day to make current date + number = date in the future.
For example
Field: Total Nights Hired = 2
Field: Date due back = 23/02/07 + 2 = 25/02/07
I am sorry if I did not explain this well enough. I am totally new to databases but need help in my corsework. I am designing a video rental system.
Any help will be greatly appreciated.
Andy
View 7 Replies
View Related
Apr 16, 2008
So here is my problem i am semi access savy but i have having trouble with one thing. At work when we make a schedule there are 5 possibilites for how you want to mark your day. I have created a field using text as my parameters since my possibilities include both letters and numbers. At the end of each week I need to create a calcuation only utilizing the number which is 1 to add up the total shifts in the week.
I have tried some IIF statements with no luck. The 5 possiblities are 1, c,r,a,l. Each of the letters stand for something. When the scheduler runs the query he needs to see the letters or the number for each day. But i can't create a properly working calculated field for adding all of the 1's together only. The letters don't need to be added. Any ideas?
Also I have to run a sum for the total of each day at the bottom so I am running into the same problem there if there is any letters in the boxes. Going to a number field is not an option
thanks for the help
View 6 Replies
View Related
Mar 4, 2013
I have a report which is a statement. I want to be able to have a field that calculates rent, and minus payments. There are a few rent types, Pro Rated rent, Rent brought forward and rent changed, then there is 1 payment type. I am trying to write the sum a few ways, but have not had success. If rent type i= 1 or 2 or 3 I want it to add, if rent total = 4 I want it to minus.
=Sum(IIf([RentType]=1 Or 2 Or 3,[RentAmount],0))-Sum(IIf([RentType]=4,[RentAmount]))
View 2 Replies
View Related
Jan 29, 2005
Hi all :)
Consider the following:
I have orders from an order table, a table for delivered items (as customer might not get wat is ordered due to various reasons), a client table and an item table.
My current problem revolves around the packers form, to enter what is delivered in a simple manner. The main form shows a customer and the sub form shows the delivery form. This delivery form shows fields for one customer, and the rows are "per item":
- Item name
- sum Ordered
- packed (unbound)
- delivered (checkbox)
- actual delivered
- Diff (between "sum ordered" and "actual delivered")
My first limitation is that the order numbers are obtained by crosstabbing and various unions and joins, so the rows are not directly updatable. The workflow I vision is:
1. The "packed" field should have a default value of "sum ordered"
2. User verifies or changes the packed field to the number of items being packed
3. User then clicks the "delivered" checkbox and the system inserts a row in the delivered table, refreshes the forrm and the "actual delivered" should be filled in as well as the "delivered" checkbox checked
4. At some point user wants to change delivered item and updates the "packed" field and the system changes the "delivered" checkbox to unchecked)
5 user verifies change of number and checks the "delivered" checkbox and the system updates the delivered record and does a refresh
At first I tried to have the "packed" constrol source to "iif(isNull([actual_delivered]);[sum_ordered];[actual_delivered]". This expression works, but when I try to change the value is says "form is read-only" (when I try to change some other field it says "Th recordset is not updateable"). I then took away the expression and it was updateable, but as soon as the field is updated, all the rows gets the same value.
I thught about setting the "packed" value in an event, but it seems as long as it is unbound, all rows will have the same value (tried on curent). To me it feels like a chicken and egg situation, which usually means something is not done right. I also believe that I can "fake" the checking of the checkbox by using a "mouse down" or "key down" to catch the user's intention and then update the underlaying values and do a refresh. It doesn't feel right, but that's the direction this is taking because of the uneditableness.
Has anybody got an idea of how to mix non-updateable and updatable fields in the same subform and have seperate values in an unboud field? or a bettwe way of doing this?
Thaks :D
View 3 Replies
View Related
Mar 15, 2005
Hi,
I have a form with an unbound control on it. The record source of the control is a DLookup function, which works fine. When updating the table (on which the DLookup Function is based) through different form, my unbound control on the other form that uses the DLookup Function does not refresh.
I have tried requerying the control on the Form's Got Focus, On Activate, and On Current events, with no success. I can get it to requery using OnClick event of the control itself, or the Detail or Header Section of the Form, but I don't want the user to have to click anything for the most recent data to show.
Your help is appreciated! THANKS!
BJS.
View 2 Replies
View Related
Aug 22, 2005
OK, I figured out how to make a calculation. My big problem now is to have a global field, which would be "beginning balance" and "ending balance". I have 5 employees that share the budget. The budget starts at $1280.00. One employee may buy somthing one day and then another day while another employee may also buy something. I want to be able to put in the amount the employee spent and have it deduct from the balance. But then when I go to another employee and subtract what they spend I want that to subtract from the balance. I want the balance to be visible at all times no matter what employee I am on. Hope this makes sense. I have an attached file that shows how I did it for one employee. Cannot figure how to be able to do it for each employee and just the balance changes. Also I built a subform to be able to show different dates. But the problem again is having it subtract from one global balance. Thank you.
View 3 Replies
View Related
Aug 26, 2005
I have the calculation =DateDiff("yyyy",[DOB],Now()) in the Data/Control source properties of a numeric field in a database/form which correctly calculates age in years from a date field DOB. How do I get this field to save to the database?
Georgina
View 2 Replies
View Related
May 11, 2014
I would Like to save the data to our Table
[InvoiceTotal] - [InvoicePersonal] "if Invoice Personal contains a value" = [InvoiceShareLoan]
If "InvoicePersonal" does not contain a value, no calculation will be made
View 2 Replies
View Related
Jan 31, 2013
is there any way to sum a column or field that has a calculation in them?
View 5 Replies
View Related
May 31, 2013
Im building an expression where I am dividing fields by constants and adding them together. I need all answers always round down, so 19/20=0, 21/20=1
View 8 Replies
View Related
Dec 3, 2014
My Sales! table has fields [ItemType] and [Price] and VAT! table has [ItemType] and [VATRate].
Both tables has a common field which is [ItemType].
I am trying to make a query which will calculate the VAT figure by multiplying the Sales table [Price] with the corresponding [VATRate] in the VAT table by matching the [ItemType] in both tables.
I tried DLookup but couldn’t find a solution. How do I accomplish this?
View 1 Replies
View Related
May 27, 2005
happy friday to all! I may just be missing something simple here but not sure what. I have a form with an option group of radio buttons, an unbound label, and an unbound text field.
If radio button A is selected, the the label and the text field become visible. no problem with this.
when they become visible, I want to be able to enter a string into the unbound text box, and use that data to populate a query from. I know how to do this also.
No the problem: when the textbox becomes visible I can't type into it?
Any thoughts?
Thanks
Kevin
View 2 Replies
View Related
Nov 4, 2005
I have a form with a bound combo box. There is an unbound text box for display purposes only that is supposed to reflect the third column of the combo box for the current record.
I set it's default value at [cmbPartyType].[Column](2) .
It works for the first record. but when I scroll through the records, the box keeps the value that was appropriate for the first record. how can I get it to look at that combo box on every form? Even if I am not update records, just looking at them?
View 3 Replies
View Related
Oct 16, 2006
i have a form "send mails" which is unbound
it have a combobox field "to" ,i want it to bound to a field "names" in the table "email"
View 5 Replies
View Related