In query:
I want to make table with many records with one field.
For example:
I make table to store many records, but I want to add one field at last column. This column is Yes/No (Click box). This column default value is No. How can I add this column in the query. Because Table has this option Yes/No (click box). So, I think that we can do in query.
Here is what I am trying to do. I have a query with 2 fields. "Time In" & "Time Out". What I would like to happen is this. Whenever a character, let's say a "t", is entered into that field I would like the current time to populate that field. Right now we are actually typing in the time. I have the fields set up as DateTime fields currently.
I currently import data into a table and it it has a text field which looks like this: 12,345.67 GBP...I need to use a query to make this a number field so that I can sum it's contents. I've managed to remove the 'GBP' part but can't seem to get rid of the comma?
I have two tables that are joined - called A and B. A has two fields, "PLACE" and "RAND" and is joined to B via field "RAND". Other than "RAND", B has several fields named 01 TOTAL, 02 TOTAL, 03 TOTAL, etc...for about 60 fields.
The "PLACE" field in table A has data that is 01, 02, 03, ect.... How do I structure a query so that whatever "PLACE" is, I can match the XX TOTAL value? In other words, i need to have the query field header be somehow dependent on the value in "PLACE".
I’m developing a claim tracking database that tracks dates of events that occur in the course of processing a claim; such as, Loss Date, Report Date, Estimate Date, Payment Date, etc. There are 16 different “Events” in all.I currently have the following tables set up:
tblClaim ClaimID ClaimNumber fkEmpID
tblEmployee EmpID EmpName
[code]....
What I need to do is create a form where management can choose two or more events, and calculate the average number of days between two of any of the events, for an employee, or all employees.I have created a crosstab query to change the values in the EventName field in tblEvents to field names, and the EventDate as values for the related EventNames. I created another query based on this query to do the DateDiff.
I created combo boxes on my form with the Row Source Type set to Field List, for a list of fields in my crosstab query. I’ve tried to use the following DateDiff function to get the days between the two fields selected in my combo boxes:
But I get an error about unrecognized field name or expression for my combo boxes. So I added my combo boxes in the query parameter window, with a data type as both text and value, but with both I get an error “This expression is typed incorrectly or is too complex to be evaluated.” I also specified the column headings in the crosstab but I still am getting the “too complex” error.I’m pretty sure it’s trying to do a Datediff on the literal values in the comboboxes and not recognizing that I’m trying to specify field names.Is it possible to assign field names in DateDiff this way?
I have 3 peices of data that I am working with: Group number, plans and benefit elections. On my form I have fields for the group number and plan and 2 queries. When I enter a group number the first query displays a list of plan descriptions for that group. From there I can enter the plan description into the form's plan field and that runs the second query to give me a list of valid elections for that plan. This all works fine but I want to make the plan selection a little less tedious. What I would like is to be able to double click the query field housing the plan description and have it copied to the form's plan field. I could use the ID instead of the plan description but I work in a production environment and very key stroke counts so I would really like to have a simple double click process.
Is this even possible? If so how would I set that up? I tried using the double click on event macro builder but it does not seem to have this kind of option.
My form contains fields for group number and Plan. The same form houses 2 querys, one that pulls plans based on the group number and the other to pull elections based on the plan field (not the plan query). Would like to double click a plan within the plan query and have that description populated into the form's plan field.
As the title says, i have an identifier field which combines two codes eg. AAAAAA/1234.
I am using a query to extract the number part, however when i try to link to another query it says 'type mismatch'.
I assume that this is because the main query is based on a table where [ShipID] is numeric and the extracted data is based upon a underlying table where [PackageID] is a text field.
I'm trying to create a new field based on two existing fields as part of a select query. Two tables in the query each have a "HOSPITAL" field which is an indicator for "Y" or "N" for each department (in the DEPTLOOKUP table) and for each facility (in the Facility Lookup table). I want to create a field whereby a new indicator is created so that a Y is given for each record only where the facility and department HOSPITAL indicator field is both "Y". I have attached a word document that has a screenshot of the query in design view as well as the access sql code.
I need to create a query in Microsoft Access to enter 1 or 0 in a field based on whether numbers in another field is positive or negative. Here are the details.
1 entered in a "late" field if "TotalHoursAheadOrBehindScedule" field has a positive number 0 entered in a "late" field if "TotalHoursAheadOrBehindScedule" field has a negative number
I am trying to run graph on a report from query but what's happening is query shows name but report on graph shows ID'S of the field .
Below is my query
SELECT tblMainTWTTPSheet.txtRootCause, Count(tblMainTWTTPSheet.txtRootCause) AS CountOftxtRootCause FROM tblMainTWTTPSheet GROUP BY tblMainTWTTPSheet.txtRootCause, tblMainTWTTPSheet.Date HAVING (((tblMainTWTTPSheet.txtRootCause) Is Not Null) AND ((Count(tblMainTWTTPSheet.txtRootCause)) Is Not Null) AND ((tblMainTWTTPSheet.Date) Between [Forms]![frmStratificationOfRootCauses]![startDate] And [Forms]![frmStratificationOfRootCauses]![endDate]));
My bound column on main menu form and back end table is 1
I have two fields the have differing dates in them. I need an action query to make the date in one field the same as in the other. I have thousands of records to do this to. Is there a way via an action query (update?) to do this or does it have to be an SQL statement query?
I have a Form that has a subform and in that there is a subform that runs a query. I need to take the value of in one of the fields returned in that query and transfer it to a field in my original subform.
I have a field that is giving me the number of business days between a period of time and then I want to subtract that number - the person's PTO time to see the actual days they were available...when I simply type the number in (see below) it works great but I want to set up a prompt that will ask me how many PTO Days to calculate as it will be different for each person I am quering...is this possible?
I'm building a report for annual software license renewals. The report data source is a query that combines the customer information, their computer information, and the licenses purchased for that computer. I am having no trouble with the form displaying the customer info page, then a page with the computer info at the top and a list of licenses purchased for that computer underneath.
That would be great, if that's what my boss wanted. However, she wants the whole list of available licenses displayed on each page, in the event someone want to purchase additional licenses with this year's renewal.
I'm trying to figure out how I can set up a query/report grouping to do that. I've tried making a new query, relating the qryLicense!licenseID to the qryPurchase!purchLicense and setting the relationship option to show all records from qryLicense and only those related from qryPurchase. I added the qryPurchase!purchCPU field to my query, hidden it, and set the criteria to =1 (the computer ID of one of my dummy computer records). I also have a Sum of the qryPurchase!purchQty field included in the new query that I want to display the total number of that particular license purchased (and 0 if there are no corresponding records). All fields except for the quantity field are set to Group By.
What Im getting from this is simply a list of the licenses purchased for that computer, not the complete list of licenses available showing the quantity purchased where applicable.
I am trying to use a single record and cell of data generated from a query as criteria in another query but can't figure out how to do it? Is there a way to reference a query field in the criteria in design view of another query?
Details:
I have a table of data for each month with supplier codes in each table, but no date field.
I am trying to build a query that will automatically pick the most recent month of data. I have built a query that uses an iif statement in SQL assigning a number to the most recent month of data and then I am using the max filter in that query to show the single highest number (But this logic misses suppliers some suppliers but does assign a number to the most recent set of data). In this case its 2 for february data. I want to use this digit to filter a seperate criteria that will show me all the supplier codes for the month of february. One problem is that some suppliers are in every month others, come and go throughout the year, so I have to assign this criteria for each month. Therefore I want to use the 2 from the first query and plug that into each criteria section under each month field of the second query.
The other option that I can think of but can't seem to find a fix, is to merge all 12 tables so there are duplicate entries and can have a date or number assigned for each month that the supplier code shows up, then just use the max number. I can't seem to find a way to add all the codes creating duplicates into one field. I used a union query but there are no duplicates with this method thus foiling my plan.
I have two tables, Group and Person.A group can hold one or more persons, linked by a field called GroupID.And a person can be a leader of a group.I want to make a query to return the leaders of the group, which I can do, ie. where tblPerson.Leader = true, but I also want to calculate the number of persons in that group.Any ideas or if you need more information, please let me knowBobThinking about it, I suppose its more of a count function than a sum function, but I've never been the best with queries
Hi all, I attached a screenshot belowWhat i would like to get done is calculate the sum of the row NUM when every field except SERIAL_NUMBER has the same record.So for the screen shot it would calculate 55+57 for the first 2 rows, 15+16 for the second 2 rows etc... and display them in a new column Named SUM i.eSERIAL_NUMBER | PRECINCT | CONTEST_NAME | CANDIDATE_PARTY_NAME | CANDIDATE_NAME | CONTEST_ORDER | NUM | SUM9200|7000003|Referendum 1| |YES|195|1|55|1129218|7000003|Referendum 1| |YES|195|1|57|1129200|7000003|Referendum 1| |NO|195|2|15|319218|7000003|Referendum 1| |NO|195|2|16|31Is there any way to do this.Here is my query for the ssSELECT DISTINCT Turnout_machine.SERIAL_NUMBER, Pct_Pollnum.PRECINCT, Canvass.CONTEST_NAME, Canvass.CANDIDATE_PARTY_NAME, Canvass.CANDIDATE_NAME, Canvass.CONTEST_ORDER, Canvass.CANDIDATE_ORDER, Canvass.TOTAL AS NUMFROM (Turnout_machine INNER JOIN Canvass ON Turnout_machine.SERIAL_NUMBER = Canvass.SERIAL_NUMBER) INNER JOIN Pct_Pollnum ON Turnout_machine.PRECINCT_ID = Pct_Pollnum.PRECINCT_IDWHERE (((Pct_Pollnum.PRECINCT)=[forms]![Canvass]![pctID]))Thanks once again to everyone that helps.Take care
I would like to reference a field value in a query, and not sure how to do this!
For example, I would like to query all purchases by [myTable].[my_field]. When I try this in a query, Access keeps prompting me for a value and doesnt use the actual value in the table.
I am working on creating a donor-ranking report that displays the top 25 donors to our organization based upon a year of giving records. I have a query that displays the contributions made to our organization and it sorts by the donor number. I have no problem showing only the sum of each donors giving. Thus, it only shows their name once and the sum of their contributions for the period of time I specify (start date - end date).
What I cannot figure out is how to sort by the sum calculation I have on the form (=Sum([Amt]). I think it might be easier to set up my query with a new field to do the summing so that I can sort based upon this field, but I have no idea how to set this up. I did a search of this forum and found three posts, but none help me.
I would like to know exactly what to put in the field that I am creating in the query.
Sorry if this is super easy, I'm just not sure how to get it done.
I have two tables. [Charity] is a line detail, so there are multiple using the same Customer Number. [Summary] is a table holding unique customer details including how much they've donated.
So I have a field called "Total" in Summary (purchased items). I want to grab the SUM of charity values from the [Charity] table and add that value to the "Total" field which is already populated.
Ive linked the two tables by CustomerNumber, and I've tried grouping the totals in [Charity] and adding them like this: