Search results

  1. A

    Average based on number of data points

    I have table which contains 6 month historical usage of items. I am trying to calcuate an average usage number for each item. The issue is that not all items have 6 months of data. So for an item that has 3 months of data I want to calculate the average such that the denominator is 3 and not 6...
  2. A

    Question Formula for 'Week Starting Date'

    Hi, I want to calculate the week starting based on a given date in an access query. The formula I am currently using is, Wk_Starting_Date: DateAdd("ww",[POA_ETA_Wk]-1,DateSerial(Year([POA ETA]),1,1))-(Weekday((DateAdd("ww",[POA_ETA_Wk]-1,DateSerial(Year([POA ETA]),1,1))),2)-1) For my...
  3. A

    Query parameters defined by variable instead of form

    Hi, I want to design a database that will pickup a windows username and store it to a variable. Later on I want to reference to this variable as the parameter in a parameter query. In other words, in the parameter queries I have built so far I have always had the user enter the parameter in a...
  4. A

    Grabbing the year from a date entered as a parameter

    I have a form in which the user enters a StartDate and EndDate which determines the range of data he wants to view. I want to grab just the year (YYYY) part of the EndDate and use it as a parameter result for the YTD. i.e. if StartDate=01/2009 EndDate=08/2009 I want my query to read the EndDate...
  5. A

    Parameters in a union query

    I have a union query the SQL for which is as given below: TABLE MIOH_MONTH UNION TABLE SERVICE_MONTH UNION TABLE SURPLUS_MONTH UNION TABLE TRFALL_MONTH; One of the columns of the union query is a month column, I want to add a parameter to this query which will prompt the user to enter the month...
  6. A

    Criteria to specify range of months and YTD

    I have a query which has a column called period. The period column contains months (mmm/yyyy) and year (yyyy YTD) for the data that the query generates. Jan-09 Feb-09 Mar-09 Apr-09 May-09 Jun-09 Jul-09 Aug-09 Sep-09 Oct-09 Nov-09 Dec-09 2009 YTD...
  7. A

    Criteria: Display data between two dates and YTD

    I have a database that calculates monthly on hand inventory and YTD on hand inventory. Each month is displayed as 01/2009, 02/2009, 03/2009 ....etc and there is a YTD number e.g. 2009 The above query is a crosstab query in which the employee name is a row heading, period (mm/yyyy and yyyy)...
  8. A

    Error 3265 - Item not found in collection

    I am getting this error everytime I run this script. Can anyone tells what is causing the error? To give you a brief description of my database - I have got a database that consists of a query which calculates monthly inventory data (MIOH) A cross tab query then creates a cross tab such that...
  9. A

    Changing Field Types

    Hi, I have a query which works off of objects I do not own. The field that I would like to join is in text format in one source while it is in the numerical format in the other source. I want to convert it into the same format so that I can join the two fields. Here is the SQL I am using SELECT*...
  10. A

    Setting field formats for linked tables

    Hi, I have a linked xls file which contains bills of lading along with other details. Bill of lading could be either numeric or alpha-numeric (starting with an alphabet). In the current setting my database ignores (blanks) out all the alpha-numeric bills of ladings and retains only the numeric...
  11. A

    Formatting a field in an access query

    I need to format a field in my query as a number. Does anyone how this can be done? Thanks!
  12. A

    Change Password Form.

    Hi, I have a change password form on which there are 4 text boxes and a button. Text Box1= login name (windows username of the user picked up automatically) Text Box2=oldpassword (user enters the old password) Text Box3=newpassword (user enters the new password) Text Box 4=newpassword1 (user...
  13. A

    Selecting all columns after a specific number of columns from a cross tab query

    Hi, I have a cross tab query that is based on monthly data. I have another select query based off of the crosstab query. At the end of each month the crosstab query gets a new column with the data for that month. The crosstab query also has details such as name, type etc in addition to the...
  14. A

    InitVars Sub or function not defined

    I have the following code for the report. When I run the debugger I get an error saying Sub or Function is not defined and InitVars is highlighted. Option Compare Database 'Use database order for string comparisons Option Explicit 'Constant for the maximum number of columns generated by the...
  15. A

    Limitations on number of queries looking at a form text box for parameters?

    I have a database with a number queries containing monthly performance data for each person. I use a form to specify the criteria such as Name of the person, role of the person and the period and have prompts in the queries which look at the form for this criteria. (all these queries look at the...
  16. A

    Storing the result of a field expression to a variable

    Hi, I have a query that calculates a normalization factor based on the number of days in the current month. I need to use this factor in another query however these queries do not contain common fields that I can use to join them. The only way I guess I can do it is if I save the normalization...
  17. A

    Query does not work on one computer

    Hi, I have a sheared access database built using Access 2003. The query in this database has parameter prompts (for criteria) set in it which prompt the user to enter from and to dates. This works fine for everyone trying to run it using Access 2003 as well as Access 2007. However there is one...
  18. A

    Dynamic Reports

    Hi, I have a query which contains monthly data. Every month a new column is added to the query. All the calculations are being done in the query and I am using the report just as a means to present the data. I will however need to have dynamic textboxes/labels on the report which will...
  19. A

    Code for using a variable generated on loading a form to lookup a table and based on

    I have a form which when opened reads the username of the person that is logged on to the computer. The user is stored as a variable. This variable is called strUser I have a table in the database which contains the windows username and key among other fields. I want to write a code which will...
  20. A

    Run time error 2001

    Does anyone know why this statement is causing error 2001? If Me.password.Value = DLookup("[Password]", "UserInformation", "[UserID]=" & Me.UserName.Value) Then password and UserName are names of text boxes in a form, while Password and UserID are names of columns in the table UserInformation...
Top Bottom