I want to get remarks as like this i have a query which is showing the total of different fields suppose the total is 77 and I want to give a crietria field by name of net level which shall work like this ..
if the number is from 0 to 33 then then the result should be C-1 if from 33 to 40 then C-2 if from 41 to 50 then C-3 if from 51 to 60 then B-1 if from 61 to 70 then B-2 if from 71 to 80 then B-3 if from 81 to 90 then A-2 if from 91 to 100 the A-1
ID Attending Trauma RN Date 1 A No Yes 1/1/12 1 A Yes No 2/1/12 1 B No Yes 1/1/12 1 A Yes No 3/1/12 1 B No Yes 6/1/12
I merged this query into a report to give the count of each attending equaling yes only. I am using this:
=DCount("*","qryMainJan-Jun13","[PeripartumHysterectomy] ='Yes' And [Text30] = ID")
The goal is to show each attending on a separate page with count on text box
The issue I am having is I can't show the correct total in one page for each attending. for example I am showing attending A twice for trauma with total 1 for each page. I need to show attending A with total 2.
I am trying to produce statistics reports in my database. The user selects the information they require in a form (date from, date to etc). A query then produces the results listing each job in turn which is what I want however at the end I would like to produce sub-totals for each client.
Depending on the criteria selected by the user, only some clients will appear in the list. Ideally I would like the footer to show something like:
Client 1 - 4 jobs Client 2 - 1 job Client 5 - 6 jobs Client 6 - 17 jobs
The main table for the database I am working on contains the following fields:
ID Mfr Control Number Initial or Follow-Up Follow-up Number Suspect Date of Initial Email Date Received Date Submitted Date of Report Serious Brief Description Causality Notes
With some additional qualifications I wanted to find records that had an intial report but no follow-up. Which translates too I want records that are unique in the Mfr Control Number field (no duplicates).
I am trying to build a query and keep getting hung up on the unique aspect of fields. I started by trying to query only "Mfr Control Number" fields that are unique (no duplicates). As best I can figure for some reason I can not add any additional fields to that query. My current query is set up in the query build table such that I have added "Mfr Control Number" in two columns. The first column in Total I have "Group By". In the next column I have set Total to "count" with a criteria of 1. If I try to add any other fields from my table than I seem to lose those unique results. But I need to further filter to get the exact information I need.
I want criteria on the "Initial or Follow-up" field to only bring "initial" I want criteria on the "Serious" field to only bring "serious" I want criteria on the "Date of This Report" field of "<Date()-"15""
Is there some way to take the results of that initial query to then build a another query based just on those records? I could then apply the further criteria and run my report. Or is there a way to do this in one step?
I've tried to make clear my intention but know it can be difficult to get this kind of stuff down in writing in a clear fashion. I have to be careful to keep information confidential also so some of the details are vague.
I have a large table with information about different cars, called "Car Metadata". In this, each car has a unique identifier ("Car Code"), the make ("Manufacturer Name") and the model ("Short Model").
What I want to do is create a form with dropdown menus.I have a first combo box with all the makes in the Metadata table.
What I am having trouble with is that I want a second combo box underneath which would only show the models which correspond to the make selected in the first box.E.g. someone could select Ford in the top box and the second box would only show Fiesta, Focus etc.
Once it has done that I want it to be able to write the Car Codes for the records which match up to the make & model selected to a new table. Just to complicate things further, there can be multiple records with the same make and model but different Codes, I want all these multiple codes to be written to the final table.
I want the lookup to be performed with criteria based off of the same row that record being selected is on.
I wrote typed out the Columns and rows that my queries return, and attached a screenshot as well.
You enter your phone number which provides you with an indexed location. Based off of that location only certain products are available and I want them to be filtered accordingly. I have it working to some extent, here is an example below:
Is there a way I can make the lookup run off of the location specific to the current row that I am working on?
P.S. Here is a copy of the SQL statement I'm using right now.
SELECT DISTINCTROW [DSL Product CLLI's].CLLI, [DSL Product CLLI's].Speed, [DSL Product CLLI's].CLLI FROM [DSL Product CLLI's], [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet] WHERE ((([DSL Product CLLI's].CLLI) In (SELECT DISTINCTROW [Location] FROM [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet] WHERE [Copy Of Copy Of Customer NPA-NXX's - ADSL - Data - Internet].[Location]=[DSL Product CLLI's].[CLLI])));
Which Returns the Following in my lookup field for Products Available.
The query returns the parts used for each job. This could be 1 to many, so I get 1 to many rows returned in the query for each job. There can be a number of jobs to a work schedule (I'll call this WS). Each job is for a particular model. So I bascially have
I have a DB with all my patients and (among other things) all their referral source.
I would like to print a status report of all my patients, grouped by the referral source, and fax them to the appropriate offices. Easily done with the report wizard.
What I need to know is, how do I create one report, but force a new page for each referral source?
I am selling some products, namely A to M. I record the orders of costumers in a table, named "orders". For example, if costumer "Jack" has ordered as the following:
Code: ID costumer product quantity unitprice orderdate
12 jack A 4 10 25/11/2014 13 jack B 5 5 25/11/2014 14 jack C 1 4 25/11/2014 15 jack F 3 2 25/11/2014 16 Jack G 4 8 25/11/2014 17 Jack H 1 7 25/11/2014
Then I make a report based on the above table and issue that as the invoice to the costumer, who is jack here.
How can I make a unique invoice number, which automatically increases sequentially for each invoice? Do I need to add a new column to the table? I also need to be able to look for a specific invoice based on the number, or date.
I have a report which is based on a query. The query combines information from TBLDwgReg and TBLDwgRegDtls. The unique field linking these two tables is DrawingNo. The query - QRYDtldDwgReg - is showing 99% of the information I want to see.
My problem is this - one drawing can be revised several times. I have my report grouped by IssuedBy and then grouped by DrawingNo. In the group footer for IssuedBy I want to count the number of drawings issued by a particular consultant. For example...the structural engineer has issued 17 drawings for a particular project but when I do a count it is returning a total 27 because some of those drawings have been revised.
I tried grouping in the query and counting the DrawingNo field there but that's not working either.
I have tab controls, each of which holds a report. If the report is longer than the tab control the report is stuck there. no slide bars, no overflow. I have set scroll bars but they dont seem to take or work. I need to find a way to add verticle scroll bars to the reports within the tab controls so that you can view the entire report. I have included a screen print of what I mean.
I'm trying to build a query criteria for a tab control with three different tabs. They are all using the same subform in each page. I want to be able to set the criteria for one specific field to the current tab control page that is selected. Does anyone know how to do this? I wasn't able to find it on the forums...
Hi all. Been away for some time due to the necessity of working two full-time jobs and maintaining house and family. I'm now back to one job and have a bit of time on my hands so I'm making a little db for myself.
I keep going to the video store and renting movies that I already have so I decided to input them into a db and play with it to resharpen my dull skills.
Very small and simple. I have a query that's fed by two tables. This is what I want to feed one form that will display in datasheet view when a selection is made from a cbo on another form. Not a problem. What I want to do is have the one query and one form for two or more cbo controls, each passing a different criteria. For example, in cboGenre when Action is chosen, the datasheet view shows all the movies with that genre. Then when another is chosen, it requeries with those (the requerying part isn't a problem). Then, when PG-13 is chosen from cboRating, the datasheet shows all the movies with that rating.
I can do this when it comes to passing where conditions when opening a report, but a report isn't really the cleanest way to go.
Hope everyone has had a great year (at least as long as I've been here) and look forward to your responses and also browsing the information here again.
I have form with a number of of combo boxes that filter a query that populates a list box. It's used to track inventory. I want to add a toggle button that when press will filter my query so that it shows only items with a value > 0 in the quantity field. And when not pressed it won't filter by that field at all.
Hi All. I have a query that is based on 1 table. I am using a form with a calendar control for the users to select the date range. In my table the date format is mm/dd/yyyy. My calendar control is pulling the date format mm/dd/yyyy I need my query to only look at the mm/dd part of the field. In my criteria field inc_date I have Between [Forms]![frm_LookUpEnquiry]![txtSelectDate] And [Forms]![frm_LookUpEnquiry]![txtDate2] I have tried the datepart but Im not sure I am doing it right. Basicly Im not sure how to parse out the date to only look at the mm/dd. Or would this be better done in a SQL query Any Idea's for this would be very appreciated. Im kinda in a bind on this one and its the last thing I have to do to finish this database.
I learned the criteria on this forum Forms!FormName!Control or Forms!FormName!Control Is Null
It enables me to leave the text box on a search form blank to return all records. This seems to work but has a very odd behaviour.
In design view, I typed the criteria for 3 fields and saved the query, but when I reopened it, the criteria added 3 NEW COLUMNS and spread over 8 ROWS (as in the image attached.)
The SQL was even unreadable:
SELECT Table1.ID, Table1.FldA, Table1.FldB, Table1.FldC FROM Table1 WHERE (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldB)=[Forms]![Form1]![txtB]) AND ((Table1.FldC)=[Forms]![Form1]![txtC])) OR (((Table1.FldB)=[Forms]![Form1]![txtB]) AND ((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtA]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtB]) Is Null)) OR (((Table1.FldC)=[Forms]![Form1]![txtC]) AND (([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtB]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND ((Table1.FldB)=[Forms]![Form1]![txtB]) AND (([Forms]![Form1]![txtC]) Is Null)) OR (((Table1.FldB)=[Forms]![Form1]![txtB]) AND (([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null)) OR (((Table1.FldA)=[Forms]![Form1]![txtA]) AND (([Forms]![Form1]![txtB]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null)) OR ((([Forms]![Form1]![txtA]) Is Null) AND (([Forms]![Form1]![txtB]) Is Null) AND (([Forms]![Form1]![txtC]) Is Null));
I don't know how to add the criteria for the 4th field.
My form is based on a table (SOP TBL) and has several text boxes with control sources of the records in the table. I need to add a criteria to one field (SOP Number) so that only current versions of the number show up. I have the SQL for a query that I use in another form for a combo box as shown below. What this criteria does is find the version number which is the last 2 digits of the SOP Number and displays only that record for the SOP Number in the combo box. How can I apply this code to the text box with the control source directly from the table so only the current records are displayed on the form?
Code: In (select max([SOP Number]) from [SOP TBL] group by left([SOP Number], len([SOP Number]) - 2))
I'm working on a report called Open Orders and when the database loads, it takes you to a Navigation Form. You make some selections mostly from combo boxes, then click run report which runs a query then launches the report.
I want the user to be able to click a check box called "Ready Only". If the checkbox = True, then I would like the field "Ready Pieces" in the query to have the criteria ">0". If the checkbox = false, I want that field to show all values (*).
I have no problem setting the criteria of a query field to equal that of a combo box value (Warehouse Like ([Forms]![Process Form]![Warehouse] & "*") but have problems when the criteria isn't the exact same as the value of the control.
Things I have tried to no avail: Putting a Iif statement in the query criteria: gives an error that criteria is too complex Creating an invisible text box whose value is determined by the checkbox to ">0" or "" then basing the Ready Pieces criteria equal to this....doesn't work Trying to use the DoCmd.RunSQL with my SQL code that changes via VBA when the checkbox is changed...Get an error and the SQL doesn't run
I have a totals query that provides an avg for each month. i'd like to be able to use a text box control (named "Date") on a form (named "Report Runner") to show only a certain month and it's avg.
I tried using this as criteria on the "MonthGroupPMC" field:
I have a form (named frmAddSession) with a combo box (named Band_Name) and lets say i have it displaying the band "Band A"
I have a query where the criteria is [Forms]![frmAddSession]![Band_Name]. when i run the query the results are blank. but if i type ="Band A" it works just fine.
why won't my reference to the combo box on the form work?
In a series of deductions to try and figure this out, my form only has the one combo box, and my query is based on only one table and only has the one field.
Private Sub btncard_Click() Dim stLinkCriteria As String DoCmd.RunCommand acCmdSaveRecord stLinkCriteria = "[jobref]=" & "'" & Me![jobref] & "'" DoCmd.Close DoCmd.OpenForm "k_job_card", , , stLinkCriteria End Sub
this button code opens the k_job_card form.
the form opens and says 'Record 1 of 1, (Filtered)
i have a control on the form that opens.. and i am simply trying to assign a default value to that control..
it is a textbox.. for my jobtype field (text datatype)..
is there any particular reason why i cannot assign a default value to a control if it has been placed on a form that has been opened using a form filter?
this is how the Form Data tab is set at the moment..
I want the Query Criteria to pull its value from a control on a form.The form control either has data or is null. (My problems occur when the form control is Null). The field in the table either has data, is null or is blank.
Code: =IIf(IsNull([Forms]![FormName]![FormControl]),"" Or Is Null,[Forms]![FormName]![FormControl])
This works for the records with fields that are blank.
This works for the records with fields that have data.
Code: Like IIf(IsNull([Forms]![FormName]![FormControl]),"*",[Forms]![FormName]![FormControl])
This works for the records with fields that are Null or Blank if i drop the iif function but then i lose the ability to pull criteria data from the form control.