Any way to make the query expired after a defined period but it must remain with that query only not for other queries. Also the query expires should have an option to be alive again or redated for next period after updation means expiry means stop working but not corruption or anything else.
I'm having problems figuring this one out -- I'm fairly new to access. I have included a JPG attachment that shows the information I currently have in use and what I would like. I need a SQL statement that will generate the rolling 12 months by period.
The end results will be a table that is populated with the rolling 12 month values so I can qry a sharepoint infopath form to look up the rolling value (look up against lng_PERIOD and chr_EE_RACF) to populate the YTD values.
I am at the last phase of producing an extensive analysis report. The last calculation I need to the query QryCom_CalculationFinal gives me the "Too many fields defined" error. I have verified that "Ps_Score" calculation push the system into overload, as QryComp_CalculationFinalPrt01 without this calculation works fine.
I am making a classic sales over time crosstab query.
Rows: Customers Columns: Sale months
Sales date is defined by the ETD of the order.
However, with the simple Format([ETD],"yyyy-mm") I get regular months, but I need to adjust the months to be between the 21st and 20th rather than 1st to 31st(30th).
August would be 7/21/2013 to 8/20/2013 September 8/21/2013 to 9/20/2013
I got a field which is defnined based on a query result to ease the user input. However, some input are not in the query list, if I input data directly to the field, ACCESS complained I must choose item from the query result. Is there any way that the user can either select from query result or direct input to that single field?
Query that would flag me if a sum over any 7 day period reached a certain amount.
Setur : I have a query of SAMPLEs. Each sample can have a PERSON associated with it. The samples have an AMOUNT also associated with them.
What I'm trying to do is set a query or flag of some sort if during any seven consecutive days a PERSON has samples associated with them where the summed amount is some value, we'll say 10. I have no problem summing an amount associated with a person over a 7 day period but am having trouble trying to visualize how to do this for any seven day period without having a sum for every 7 day period throughout history.
I copied some VBA from one database to another. I didn't change anything and I am able to run it fine in the first database. But in the DB I pasted it to, I am received a Compile Error message with the XlApp As Excel.Application area highlighted.
Function OpenAutoCount() Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook
This is giving me the error 'User defined type not defined'. I know I have to set something in a list somewhere but have forgotten how to do that. Where to go, and what to set?
I have designed an access application that logs emails that come into a department. However, the team leader has asked me to create a report to work out if emails were answered within a 24 hour period.
Is there a method to do this. It is not something I have attempted to do within access before.
I am using access 2013 and have an issue creating a query with employee hours for a two week period.
For starters I have a table with the following:
Employee Number, Date, Time in, Time out, Description, Rate Code, Week end, Pay Period. (there are a couple others but they are not needed for the query)
My table is set up this way so that each employee can clock in and out 1-4 times a day based on what they are doing. For example I may work from 6-8 in the office then 8-10 in the field. The office has one rate code and the field has a different one so i cant just be clocked in from 6-10.
At the end of the pay period I create a report and send it to an accouting firm who does the payroll. Right now I have to manually enter in each employees time. I was hoping that by using this table I could create a query that will give me the calculations I need in order to create the report.
In my query (to Start) I need to have the following with it set up per pay period.
Employee Number Rate Code Regular Hours Overtime Hours
How to set it up so that it calculates the hours based per rate code with the given pay period.
What I am currently doing is querying a table for the Count(*) for the day before. This works all well and good, but now I am wanting to break it down by a time range from the trDateDT field.
I want to make a query in my system which finds out if a room is available for a person to stay in. I want the query to show me a list of rooms that are available between a period of two dates. So if I enter a arrival Date (12/12/12) and then a checkout date (13/12/12) the query then shows me a list of rooms that are free for those dates. How would I go around doing this?
Each of the tables has fields for: -StartDate -EndDate
The logic behind the database is that each service is contracted for certain period, from StartDate until EndDate (if EndDate is not given - null - it means it is a permanent contract). For each service, we need to input prices. As prices may change during time, we may have different prices records for a service - we need to have the service period broken down into subperiods with different prices. So we need StartDate and EndDate for each period for which particular prices are valid (again, if EndDate is not given - null - it means the prices are valid "forever" into the future from the StartDate).
My problem is: I want to have a check that would return the number of services which period (tblServices) is not fully reflected in the prices periods (tblPricesPeriods). Those would be for example:
-gaps between subperiods (subperiod1 finishing 30.09.2014 and subperiod 2 starting 3.10.2014) -service period (tblServices) limited by EndDate (not null), while prices period for this service (tblPricesPeriods) having null as EndDate -start date for service (tblServices) earlier than earliest start date for prices periods for this service (tblPricesPeriods) -...
Preferably, I'd like to use a normal query for that (or set of queries), but I'm opened to other options.
On Compiling my assecc database VB code I get the following error message "User defined type not defined". I understand it is beecause I have not declared the Variable Type, but have no idea to exactly which part of the code the error is referring to.
How do I find out WHICH User defined type is not defined, especially when I have not got any (or do not want to use any) user defined types?
Thank you in advanced programming wizards. Kind regards, Adam.
Hello, I have the following code and i don`t know what's wrong Private Sub cmdCautare_Click() Dim strSQL As String, strOrder As String, strWhere As String 'Dim dbNm As Database 'Dim qryDef As QueryDef 'Set dbNm = CurrentDb() strSQL = "SELECT DOSARE.DosarID,DOSARE.DenumireDosar,DOSARE.CodDosa r,DOSARE.DataDosar,DOSARE.Denumire,DOSARE.Data,DOS ARE.Stadiu FROM DOSARE" strWhere = "WHERE" strOrder = "ORDER BY DOSARE.DosarID " If Not IsNull(Me.txtDenumire) Then strWhere = strWhere & "(DOSARE.DenumireDosar) Like '*" & Me.txtDenumire & "*' AND" ' " End If If Not IsNull(Me.cmbStadiu) Then strWhere = strWhere & " (DOSARE.Stadiu) Like '*" & Me.cmbStadiu & "*'" End If DoCmd.Close acForm, "frmPrincipal" DoCmd.OpenForm "frmRezultateCautare", acNormal Forms!frmRezultateCautare.RowSource = strSQL & " " & strWhere & "" & strOrder End Sub Here: Forms!frmRezultateCautare.RowSource = strSQL & " " & strWhere & "" & strOrder The error is the following "Application-defined or object-defined error"
Im stuck! I am pretty much a novice when it comes to access and have been given the task or creating some reports to stop us doing it manually.
Within a query, I have a date column which we would currently enter the following into the criteria:
Between #01/01/2008# And #31/01/2008#
for the month of January.
What i want to be able to do (and i know is possible as ive done it in the past but cant remember how) is have a pop up when the query is ran to enter the Start date and End date. I remember it being something to do with square brackets but cant get it to work.
I have two basic lists of employee names, ID's, phone numbers etc, with one field containing an attachment with a picture of their ID. I don't want to permanently combine these two lists of employees, as they work in different departments, but for certain events I need to be able to print a report with a list of all their names, ID numbers, and corresponding ID photos.
I tried to make a UNION query, but can't do it with the attachment field. If I leave that field out, it's no problem. To simplify, I have been doing a test run as follows, with just the name field and photo field (field 1).
SELECT [Starting Gate employees].[Employee name], [Starting Gate employees].Field2 FROM [Starting Gate employees] UNION SELECT [Farrier employees].[Employee name], [Farrier employees].Field2 FROM [Farrier employees];
Is there a way that a DB expire after 30 days? :confused:
I have found some sample DB (see attachment) but it is limited only in a single machine, cause I'm going to distribute my DB on a Network. Can anyone help me how to incorporate this to my DB. Just re-post the the updated DB thanks.
Code: SELECT Sum(Tab1.Inputs) AS SumOfInputs, Sum(Tab1.ValInp) AS SumOfValInp, Sum(Tab1.Outputs) AS SumOfOutputs, Sum(Tab1.ValOut) AS SumOfValOut, Products.Product, Products.VAT, Products.UM FROM Tab1 INNER JOIN Produse ON Tab1.ProductID = Products.ProductID GROUP BY Products.Product, Products.VAT, Product.UM, Tab1.ProductID;
Second query :
Code: SELECT Nz([SumOfInputs],0)-Nz([SumOfOutputs],0) AS Stoc, Nz([SumOfValInp],0)-Nz([SumOfValOut],0) AS ValStoc, IIf([Stoc]=0,0,([ValStoc]/[Stoc])) AS CMP, [Sum Products].Product, [Sum Products].SumOfInputs, [Sum Products].SumOfOutputs, [Sum Products].SumOfValInp, [Sum Products].SumOfValOut, [Sum Products].VAT, [Sum Products].UM FROM [Sum Products] GROUP BY [Sum Products].Product, [Sum Products].SumOfInputs, [Sum Products].SumOfOutputs, [Sum Products].SumOfValInp, [Sum Products].SumOfValOut, [Sum Products].VAT, [Sum Products].UM HAVING (((Nz([SumOfInputs],0)-Nz([SumOfOutputs],0))>0.09 Or (Nz([SumOfInputs],0)-Nz([SumOfOutputs],0))<-0.09));
I need to combine those two query sql code to make only one query.
I have an access database which import the .csv file but after importing it is creating the tables
"google_ImportErrors"
If i won't delete this, for next time i would open the database it will create the tables and follow the same sequence like stated below and it increase the size of the database so deletion must be required which i do manually.
Data is stored in 11 tables each with matching primary key. Each table has in the range of 20 fields of which only numbered data type are being used in calculations.
Each Data table has 3 augmenting queries. All these queries work individually.
Summarizing query "QStationCountList_Sum" works fine.
Calculating a summation score by each "Master_PS_ID" works fine if I only try to summarize data by 3 of the calculating queries. As you can see in the attached database "QStationTotalScore1_6" query based on 6 gives "Too many fields defined". (I have tried so many fixes I can not remember and received messages such as "To Complex") While a similar query on 3 works fine.
At this juncture I plan to build 4 new partial sum queries each from 3 collecting queries and then build a 5 Summation query adding the results from the Sum queries. Surely there is a better way.