Multiplying A Value In Textbox To A Value In A Table??
Feb 21, 2006
Hi all,
I have a table shown in a form, beside that table a textbox with a button.
How can I multiply the numer entered in that textbox by the the number displayed in the table, and view the result in the same table??
Please help me as soon as possible?
Thanks in advanced and sorry for bothering you.....
I've searched and searched to no avail to find the answer, hopefully you can help.
The story is:
At work, our holidays are now taken as hours off. For example...if I take a Monday off, its 8hrs and 5 min and a Monday morning would be 4hrs and 5 min...What I want to do is calculate how many hours I have taken off throughout the year.
The way I was going to do it was:
Create Table called Times,
Fields = Week, Day, Morning, Afternoon, Friday and 1hour all Data Type "Date/Time"
Similar field names Wk, Days, Morn etc. They would be Data Type "Number"
Now in my simple head, I thought I could simply record how many weeks or days off i had off. Then create a query (for example) Week*Wk to calculate the amount of hours I had off. In simple terms if I had 2 weeks and 2 days off, the query would multiply Week (37) by Wk (2) and Day (8:05) by Days (2), giving a total of 90 hrs and 10 min.
I know there is a datatype mismatch, but is there a way round this.
hey, i would like to see in the room price column, the total price payed for the room judging by the loyalty(no of nights). So basically i want the loyalty(no of nights X roomprice. At the moment, when i run the query it in the room price it shows just the one night price, but i want to X that by how many nights the person has stayed. I have tryed putting the sum function in the roomprice field and it didnt work.
I have a table called tbl_IE which has a field named frequency.
I want to multiple all of the values in frequency where the ID is 1. I want to display this on the form as the data is inputted and also on the final report.
For each Name, Number1 will always contain the values from 1 to 5. Number2 can vary, however.
I need constructing a query that, for each name, will look at the values in the Number2 column when Number1 is 1 or 2 and multiply them. So, the result I'm looking for is:
Name1 2 Name2 10
(Since 2 = 2 x 1 and 10 = 2 x 5)
I haven't had much look Googling (most search results involve multiplying two columns together, which isn't exactly what I'm after).
I'm trying to create a query that will return a calculated field called "PnL".The formula for "PnL" is as follows: PnL = notional*management_fee*NAV*
The "notional" field is a value derived from a table called "Deal_information" (primary key deal_id) and has an associated "management_fee" and "product" field. So obviously finding the product of the notional field and the management_fee field isn't a problem.
However "NAV" field is from another table (VL_information) that contains the historical Net Asset Value of each product. Fields are (VL_id, vl_date, product, NAV).
Therefore for each "notional" record I would like to return the historical PnL.By way of example. Lets say that the notional valuefor a particular record is $100, with a corresponding management fee of 10% (the managment fee is product dependent). Then I would like to find the evolution of PnL by multiplying this record by the evolution of the NAV. This would do so for each notional value.
I created a form for 'LabIssue' in which data will be entered. In the form I want to calculate the 'ChemicalAmount' by multiplying 'Store.Costperunit' with the 'QuantityIssued' which will be entered by the user. ChemicalAmount and QuantityIssued will be stored in 'LabIssue' table. I tried it through the expression builder but im getting #Name? error, did alot of things but couldnt figured out whats the problem.
I am attaching the initial database also for reference.
I have a query that calculates elapsed time from TimeIn and TimeOut formatted to hours and minutes. I need be able to mulitply the elapsed time by the hourly wage in order to find the hourly pay.
How do you format the time so that it is compatible to multiply with the wage?
My SQL statement is below. Thanks for your help.
SELECT tTimeCards.ValetFirstName, tTimeCards.ValetLastName, Format([TimeOut]-[TimeIn],"hh:mm") AS HoursWorked, [HoursWorked]*[tValets]![HourlyWage] AS HourlyPay FROM tValets INNER JOIN tTimeCards ON tValets.ValetID = tTimeCards.ValetID;
I have a textbox on a Page on a Tab Control on a Form.
The Record Source for the Form is set to the Table in which the Field is. i.e. Lessee.
The Control Source for the TB is set to the Field.
When I query the form to get the correct record, the value displays in the TB, but when I try to change the value, it doesn't update.
I also tried using DoCmd.RunSQL in the After Update, but get Record Lock Violation, which is fair enough, as User is in the record that they are trying to update.
I want to put a textbox on a form that will take user input (a postal code) and put it into a table. I'm not sure how to do this. Is it even possible, and if so, any suggestions?
I keep getting #Name? error. I'm trying to not use the form wizard and manually bind a text box on a form to a field in a table. I've placed a textbox on a form, then right click the text box and click properties, this brings up the properties page. In the control source property, I correctly type the name of the field. I save and switch views from design view to form view, I should see the first data in the textbox, but I see #Name?
I have a form where there is just a combobox and a textbox, the user uses the combobox to select the record they want to change and then they enter a value in the textbox which needs to be added to a field in that record.
I get a runtime error "object required" what to do. The textbox is called DeliveryValue and the record I want to add it to is called StockNumber in a table called Products.
On my form I have a tape Textbox where I put tape numbers in that is on a other table inside my access file (for now I just type a tape number in), then save the info to other table also inside access file.
I want to know how can I make it that if I put a tape number in the textbox, it must look at the table for tapes, and if the tape number is not in the tape table, it must not let me use the wrong tape number that is not in the table for tapes.
I have a table with a field named 'Comments'. On the form, I would like to have a text input and a command button. After the user enter the comments onto the textbox and subsequently click on the command button, the comments will be input onto the 'Comments' field of the table.
Q1. How can the text box be link to the 'Comments' field of the table? Q2. Only after I press the command button then the input text on the text box will be transfer to the table. What is the command for that?
I'm sure this should be simple but I can't figure it out. What I want is for a text box on a form to display the number of records within a table.
Basically I've got a make table query which creates a table ox X records depending on how many records in the original table match the criteria. So for example:
Table A has 100 records
Query identifies 30 that mee the criteria
Makes a new table called criteria_met with these 30 records
What I want is for a textbox on a form to display "30" and update whenever the make table query runs (probably via a macro??)
Hi I have a form, which displays data from a query recordsource. One of the textboxes is a "Comments" textbox, which I would like the user to write in directly, which in turn is a direct link to the data in the table so it is updated immediately.
At the moment, the textbox does not seem to be editable. Is there a standard way to do something like this ?
I want to put a textbox on a form that will take user input (a zip code) and put it into a table. I'm not sure how to do this. Is it even possible, and if so, any suggestions?
I have a timesheet table (tblHourEnter) which has a staff field (Staff_ID), week number field (Week_No) and hours field (Hours_Worked).
The data is entered through a form (frmHourEnter) which has a staff textbox (Staff_ID), week number textbox (Week_No) and hours textbox (Hours_Worked).
I wish to add another textbox (HrsTotal) that would show the sum of all the hours (from the table) which is dependent upon both the Staff_ID and Week_No entries showing on the current form. I.e. the sum of hours is restricted to both staff member and week number showing on frmHourEnter.
This total can be generated from a command button.
I've designed a data entry form based on a table. I use a few combo boxes, (linked via SQL statements for their row/source) to fill most of the fields in the table.
What I want to do is populate one textbox on the form with the contents of a field in one of the combo box's row/source tables. The field I want isn't shown in the combo box.
Basically, what I want is that when I choose a PART NUMBER from a combo box, I want the OEM_ID from the same table to jump into the textbox below it.
I think I may have tied myself in knots though to the point where what I want can't be done. Any ideas? I know this is probably going to take a couple of goes at explaining. :P
How to automatically populate the bound text box with data from a table for a specific entry. This is the code I wrote
Private Sub ListBox_DblClick(Cancel As Integer) Dim ListBoxSel As String ListBoxSel = Me.ListBox.Value Call proc_Update_TxtBoxes(Me.ListBox.Value) DoCmd.Close