Last monday's [Feed Inv]+ this weeks [Feed Del] - this weeks [Feed Inv]= Feed Consumed
Table:
Autonumber (is PK)
Date
Farm
Barn
Lbs Del (pounds delivered)
Lbs Inv (pounds inventoried, this is a physical inventory done at farm)
I can use Between[Start Date] And [End Date] in the criteria to show this weeks Lbs Del and Lbs Inv in a query, no problem.
How do I tell the query or report to subtract 7 from the Start Date to pull last weeks feed inventory?
The result will be displayed in a report, so calculating in a report would be ideal.
I have a Sub form titled Training that has the the following two fields:
[Department],[Jobs]
The jobs is a pull down select box that contains all of the job titles for the entire plant. What i would like to happen is for the user to be forced to select the appropriate department first and then use the [Department] selected to feed the criteria to the query that the [Jobs] field is located in. In addition i have been un-able to get the fields to be locked until the [Department] field is entered. I have tried the following unsuccessfully:
Jobs Query Criteria: =[Foms]![Training]![Department]
e.g: InputText is 123, InputText2 is abc I wanted to display the text inside textbox of frmCalendar as: 123 abc instead of 123abc. how shall i use the vbCrLf?
I searched the forums and couldnt find anything that directly related to my issue. What I am trying to do is export a fixed-width text file, but the issue is that the file has to be line feed only. By default Acces creates CR/LF and the client's import specification only allows for Line feed.
I am currently using a macro, with export specification, to create the file. Due to time constraints and other obligations, I am really trying to avoid VBA programming.
I've built an HTML web form that sends an email to me upon submission with all the field inputs. I have previously found success using VBA in Outlook to parse out these emails and feed the substrings into an Excel Sheet (hooray!), but now am looking to feed the substrings into Access, specifically into a table in an existing .mdb file. I figure the way Outlook will "talk to" Access will likely be a bit different from the way it does for Excel.
The way my previous script engaged with Excel was through a rule; every time a new email was received, the following script would run if the message had the subject line generated by my web form. The script would check whether Excel and the target workbook/sheet was open, act accordingly, and then input the substrings (I've excluded that part below), then return Excel and the wb/ws to their initial state. I imagine though, that with Access I might be able to feed the substrings into the .mdb without having to open it proper, the way a front-end talks to a back-end. But perhaps I'm mistaken on that front.
Code: Option Explicit Option Compare Text Public Const xlUp As Integer = -4162 'I genuinely do not know what this is _ about. It came with the initial _ borrowed code. Public Const wbPath As String = "C:...Workbook.xlsx" 'Workbook path
I am using a public function to feed a variable string to a query. So far I have got:
Code: Public Function ClientStreetModule(firstLVar As Variant, streetVar As Variant, newFL As Variant) As String Dim cslStr1 As String, newStreet As String newStreet = Right(streetVar, Len(streetVar) - Len(newFL))
[code]....
However, I only need to use newStreet as the true part of iif, in which instance all are longer. At least I think this is the problem. I realise I might need to use NZ but am not sure how. Why it is evaluating and giving errors for all records and not just when the iif criteria is true as I want it to?
How would i go about getting the field 'GMargin' (Gross Margin) to be calculated from subtracting 'SellingP' from 'PurchaseP' (Selling and Purchase Prices)?
I have a field which I enter a short time such as 3:13, 5:45, etc
Now i am creating a report which at the end of the report I would like to include an unbound text box, which displays the total amount of time for that field (pls note that the total will never exceeds 24 hours) What is the best formula to use in order to calculate this ?
Hello, I am trying to sum minutes from a database using an Access query, but the format in the database is hh:mm. I know the query to use in Oracle: ROUND(SUM((substr(actual_time,1,(instr(actual_time ,':' )-1))) *60 + (substr(actual_time,(instr(actual_time,':' )+1),2))) but not sure of the syntax to use in an Access expression. Any ideas?:confused:
Hello, I didn’t know how to explain this or where to post this but here we go! I have two databases and one of the PC's here at work can’t use some of the items in the database like on one of the databases there is some formulas in text boxes and that PC won’t calculate what’s needed in them and every PC in the plant will except for this one PC. Also the one PC won’t bring up the Allen Browne's Calendar. When you press the start or end button to bring up the calendar it never pops up but if I enter the start date and end dates and use it that way ect then it works. I have no clue why this is just happening to this one PC. Any ideas?
i have a table with fields "[DATE OF BIRTH]", "age", "temp-age"
i have a query that calculate the age: example; the query will get user to input the "temp-age" and upon "temp-age" is input and "ok" on the query, it will calculate a person's age and store the value inside table "age".
however, the calculated value for the age have some data problem. for example, when a person whose age is yy:mm 24:05 the age inside the table will be 1924:05. there will be a additional "19" at the age.
what cause the additional "19" problem? --------------------------------------------------------------------- my query in design view is like this; (see attachment) it uses " [temp-AGE]-[DATE OF BIRTH] " to calculate the age and store into table "age".
Hi, i'm trying to calculate the amount of employee for each company giving me a total in the queries.. how do i go about this? I'm not an person who uses Access to solve this. I have amount 20 Companies stored and over 800's employee.. Here are the field in the table:EmployeeIDEmployeeNameNumberofEmployeeThanks! Hope this helps.
I am very new to databases, and think i am a bit over my head. I am doing a database for vacation rentals, and am trying to calculate commissions, basically i wanted to have a set of checkboxes, labeled 10%, 15%, 2.5% and $25, with any combination of these checkboxes being able to be checked.
i want the query to work like this:
If the 10% checkbox is checked i want the query to take the SubTotal for the reservation, and calculate 10% of that number. if the 2.5% checkbox is also checked, i want the query to calculate 2,5% of the reservation and add it to the commissions total (10% + 15%)
I think(hope) that i explained that clearly? Can this be done?
In a report, I need to calculate the percentage of clients that respond "Yes" to a question on a survey. I need to create a query that will return the count of the number of "Yes" responses, and the number of total responses. For example, if 10 clients complete the survey, and seven respond "Yes", I need the 2 fields in the query to be 7 and 10. So far, I have only been able to do this using multiple queries. Thank you.
stuck in the middle of a project of employee payroll the following problems are for some suggestions:
if an employee is not taken off in a week and work on sundays, he's paid double OT; if he is not taken off he's not paid; i.e. he can take 4 days off in a month
how can i keep track of this in the db; can i use a table putting 7 days as fields and make it all yes/no so that user can check or uncheck the status against each employee(!); but for whole month how can i calculate
work period start from every month on 25th and ends on 24th in next month.
i have one field called notice_1 this field is a combo boxs multiple choice ( YES - NO ) Then i have 1 field called score_1 ( if notice_1 = "YES" then let score_1 = 5 else then let score_1 = 10 )
Does this make sense , I am an, amateur at access 2003,
I have a sub form based on an order table. I had another table which lists products which customers can buy. In the products table I have a field named "units on order" which I'd like to update when an order is made in the form and a field named "units in stock" which upon the user opening the order form again and clicking a button to say that particular order has been delievered, the "units in stock field in the products table will had added the quantity chosen in the order form.