Field Specific Criteria
Jun 14, 2006
I have a query drawing information from two tables. The first table has information about a product, and the second table holds all the faults found per product. So any one product can have anything from 1-14 faults. I have created a report from the query, but the Fault item that I put on it only ever shows the first fault for that product. Is there some way of fixing this at report level, or on the query?
The tables are connected through the ID field, but the primary key for the faults table is another autonumber. Ex:
Primary Key___ID___Fault
___1__________ 1____fault 1
___2__________ 1____fault 2
That's two faults for the same product. Maybe I could create new fields in the query like Fault1: [Fault] with criteria set to primary key = 1? And one for each fault? But when I do it, it sets that criteria to the entire query, so the results end up blank because the "primary key" field doesn't exist on the product table.
I guess what I'm asking is can you set a criteria for just one field of your query to follow? Or can I resolve this issue in the report design?
Many thanks,
Tom
View Replies
ADVERTISEMENT
Feb 6, 2015
I'm using MS Access 2010, how to flag a criteria in an age field like, Pop-up if age is under 14??
View 3 Replies
View Related
Apr 16, 2015
I basically have General Date field (e.g. 10/1/2014 6:34:11 PM) and I want to limit the results to only a specific month and only to show reuslts after 6PM. I tried everything and still stuck.
View 2 Replies
View Related
Aug 20, 2007
I have data for hundreds of stores. The data was pulled for the top 15 items by store, so I cannot obtain only the top 5 items that I need. How can I query this data to extract only the top (or bottom) 5 Subjects, by store, based on the percentage column?
StoreSubjectSalesSales %
1516Fiction56431.5-24.15%
1516Audio Unabridged1650.8-231.04%
1516History / Military History10081.1-29.99%
1516Role Playing / Graphic Novels14773.9-20.27%
1516Mystery13152.6-19.84%
1516Audio Abridged1785.9-141.84%
1516SciFi / Fantasy27535.3-7.93%
1516Juv Audio/Video1580.6-100.13%
1516Biography8103.6-15.89%
1516Sports7910.8-15.64%
1516Current Affairs / Law8141.9-14.34%
1516Reference7183-16.22%
1516Juv Non-Bk4585.9-25.02%
1516Science / Tech2961.4-33.98%
1516Movies / TV / Music / Dance3395.3-29.46%
1872Fiction307344.3-7.49%
1872Business134307.5-13.48%
1872Psych / Self Improvement100650.4-10.05%
1872Audio Unabridged29165.9-27.32%
1872Cookbooks57463.3-13.56%
1872Computers59235.7-12.37%
1872Regional59883.4-11.22%
1872Health & Fitness64713.8-10.29%
1872Maps19358.4-27.66%
1872Current Affairs / Law47927.1-11.08%
1872Travel Foreign42583.7-12.27%
1872Religion / Bibles80255.6-6.07%
1872SciFi / Fantasy67641.4-6.49%
1872Study Aids / Notes38299-11.24%
1872Games41745.1-9.79%
View 2 Replies
View Related
Oct 3, 2005
Hello, I have just spent ages doing searches and reading everything I can on locking. But, I have yet to find an answer as to how I can lock a specific field in a specific record.
e.g. Staff enter customer details, then at the end of the day the admin (me) checks it over and presses a big old button that stops them from locking certain fields in the current record only - they must still have access to the unlocked fields of the current record, and it must not lock any other records.
I'm guessing there's some VB code in the form of fieldname.lock = true, but then it locks the field throughout the whole table!
Can anyone tell me how to do this please?
View 11 Replies
View Related
Mar 21, 2006
I have a table & form which has a field called address. I need to create a query that lets me select all addresses which may contain say George Street, this includes lock ups and individual addresses for that address, i hope you will understand and be able to help
View 1 Replies
View Related
Jun 6, 2005
Hi,
Is there a way to search for queries that use specific criteria?
Let's say I have 60 queries in total, but only 35 of them use the "Province" field as criteria. The criteria is set to retrieve all records that are in Province AB, SK, ON.
Suddenly we need to also include Province MB to all of these 35 queries.
Is there a way to identify these 35 queries (all the queries use criteria in the "Province" field). These are the queries that would need to be modified to include "MB" as part of the criteria.
I hope my explanation is clear.
Thanks upfront for any suggestions!
BJS
View 4 Replies
View Related
Oct 1, 2012
We have a PHP website that utilizes an Access 2003 SP3 database. This website is used as an authorization process for a business process in our company. On the website, 8 different people must "sign off" on the process. This sign off process simply consists of typing your name and date into two different text boxes, as well as a third drop-down menu for "APPROVED" or "DENIED". These, of course, correlate to their respective fields in the Access database.
Within the past year or so, the 8th approval section was added. Since then, there have been sporadic issues where all of the approval fields would simply be erased and everyone has to go back to the form and "re-approve" their fields. I believe we have narrowed the issue to when the 8th person signs off before the 7th person. However, the approvals are not cleared every single time this happens, but this condition exists every time data is cleared. So my question is, would this be an issue related to access, or with the coding of the website?
View 3 Replies
View Related
Dec 14, 2013
I don't know what it would be called or even how to start doing it in access other than it requires a criteria here is what I'm trying to make happen with access
name date yes/no criteria would be set to date > 180 days then it would equal value of No < 180 days then equal value Yes
If i set a today's date value on the database and then criteria is based of the value in the date box with the above information how would this be done.
View 4 Replies
View Related
Sep 16, 2013
Is it possible to have a query that uses criteria to pull data from a specific table?
For example: IIf([Result]'"Negative",(tblNegative goes here),IIf([Result]="Positive",(tblPositive goes here].
The tables are just text, but the query would be too long if it was used.
View 2 Replies
View Related
Jul 16, 2014
The code below allows me to open a publisher document that is already merged to the current record. What I need is to allow the user to open the document according to the group they are reviewing. How to accomplish this?
For example:
IF Group = A1 OR B1 THEN OPEN AB_1.pub
IF Group = A2 OR B2 THEN OPEN AB_2.pub
IF Group = A3 OR B3 THEN OPEN AB_3.pub
Dim pubApp As Publisher.Application
Dim pubDoc As Publisher.Document
Set pubApp = New Publisher.Application
Set pubDoc = pubApp.Documents.Add.Application.Open("c:Publishe rAB_1.pub)
pubDoc.ActiveWindow.Visible = True
View 3 Replies
View Related
Oct 11, 2013
How to sort a field of data in a table that contains the letter S that is always in a specific place in the sequence? For Example:
13123S0-BAX
13124E1-ARZ
13122X2-THX
12134S0-GAB
View 2 Replies
View Related
Jun 11, 2013
I am trying to create a mailing list of patients. Let's say I am creating a mailing list for February. I need the mailing list to consist of people who have had surgery in February from the beginning of the database, and people who have had surgery three months ago, so anyone who had surgery in November. I have created a form that has a button which is connected to a query, the form has a unbound textbox where I can enter the month in (2 for February). Then the query uses the datepart function to search for this month in their date of surgery. But this only gives me people for surgeries with february, how would I get people who have had surgery three months ago in the same query.
View 2 Replies
View Related
Aug 11, 2014
I have a drawing register database which notes the revisions for all drawings issued. One drawing can be revised several times so I have a details table which notes the revision letter, date issued and the notes for each revision. Using this table I created a max date query to show the latest issue date and revision for each drawing. This query is used for a transmittal form for issuing drawings. Both the form and report is working perfectly.
The TBLTransmittal consists of the following fields
ContractName
IssueDate
SubSup
DwgNo (multi-value checkbox)
Using the TBLDwgRegisterDtls or the query QRYDtldDwgReg (which includes the drawing titles) I would like to create a query that would look up the latest revision at the date of issue and show the revision letter.
I started a query combining TBLTransmittal and TBLDwgRegisterDtls and in the criteria for DateIssued of the TBLSDwgRegisterDtls (which is when the drawing was issued by the architect to the contractor) I put "Not > [IssueDate]". This is filtering the information to show revisions issued up to the date we (the contractor) issued the drawing to our sub-contractor but I need now to pull the max revision only from this information.
Before I go I will give you an example of what I want from the end result
Drawing BK2-02 rev. D was issued by the architect to the contractor on July 17th. This drawing was in-turn issued to our sub-contractor (Sub "A") this Saturday, August 9th. The same drawing was revised this morning and rev. E was issued to Sub "A" today, August 11th.
I want the end report to show that Sub A received Rev. D on 09-08-14 and Rev. E on 11-08-14.
I'm wondering if another max date query on this new query would work? I'll try and see what happens.
View 2 Replies
View Related
Mar 25, 2005
Good day,
I need a textbox to a five digit number. How would I write code to reflect this.
Thanks.
View 1 Replies
View Related
Aug 22, 2007
i have this form with 6 list box that output the data of a 6 tables.
*under each list box there is a text box that sum the field of their table.
i cant figure it out..
thanks
View 6 Replies
View Related
Dec 5, 2012
I have a main table which is autonumbered on unitid, I have another table which is linked via the unitid which holds items purchased for the main table, so the second table is a subform of the suppliers and will have multiple entries of the same unitid. What I would like to do is when an item is entered into the second table, check the main table to see if it exists, if it does populate the unitid field with the unitid from the main table, and if not exist create a new record in the main table with the next unitid number.
This in essence is what I want, bearing in mind that the tblinvoices is a subform and the tblmain is not open.
If ([tblinvoices]![Unit] = [tblmain]![Unit]) Then
[tblinvoices]![UnitID] = [tblinvoices]![UnitID]
End If
View 3 Replies
View Related
Mar 3, 2008
Hi,
I wish to place a command button next to a specific field which when clicked, launches the search command ready to search records against that field.
I have already tried this and managed to place a button to search - however, this searches every field in every record - I just want to search 1 specific field.
I am a bit new to this, so please be as untechy as possible!
Thanks,
Ritchie.
View 5 Replies
View Related
Jun 14, 2006
Hello everyone,
Ive designed a databse - no problem. Ive done all queries I need to - no problem. Ive designed forms for entering data and reports for showing data - no problem. THE ONE PROBLEM I have is with 1 field.
The problem is that the field is a memo box, used to add data on groups attended. For example: General, customer care, mystery shopping.
Can I run a query so that a different user can search the memo box for attendence to a certain group? eg, search this databse and field for customer care.
At the moment I can only seach on the first word in the field. I dont really want to have seperate fields as each employee can have attendence to different groups ie bo can have just general while bill has general, mystery shopping, customer care etc.
Any help would be great
View 6 Replies
View Related
Nov 30, 2005
I have a form built from a table and in a specific cell I need an equation but can't figure it out yet. I have several different fields and I need 2 fields divided to get the result. i.e. Total_Actuals divided by SA_CDI_Money = MoneyPercentage. Any ideas how I can get this to work?
View 4 Replies
View Related
Feb 8, 2005
I know this has to be an easy fix but I can't find it. I would like to open my form with empty fields, in the first field, ready to go. Right now it is opening with the first field of the very first record. Please help
View 2 Replies
View Related
Jan 13, 2014
In my vba code i write this
If DLookup("Full_Name", "tbl_Personal_Information", "Full_Name = Forms!frm_New_Person!F_N") > 0 Then
'--------------------------
MSG = MsgBox("this client is existed and his id is {" & [P_ID] & "} ",
vbOKOnly + vbInformation + vbMsgBoxRtlReading, "client database")
Else
strsql101 = "insert into tbl_Personal_Information (Name_English, Father_English, Family_English, Mother_English,
P_ID, NName, Father, Family, Mother, Birthdate, Nationality, Record_Number, Record_Place, Address,
[Code] ....
My problem is the id in the msgbox give me the last id from tbl_personal_information
But what I want is the id of the client that i try to add...
View 5 Replies
View Related
May 25, 2005
I have a table with a large text field in it, among other fields.
What I am trying to do, in a query, is to show only the characters that are between brackets "[" and "]" for that field. And, if there is more than one pair of brackets, show only what lies between the last pair of brackets.
What I've tried so far is use InStr() functions to find these brackets and then use a Mid() function to show the enclosed text. But, it doesn't work well and it gives me a very complex query! In fact, I don't think it is a good idea to even use these functions in my query. That would probably slow it down a lot.
Can someone show me a function that I could use to do what I'm looking for? I need function names that could help me make better searches for more informations.
Thank you!
View 2 Replies
View Related
Nov 14, 2005
Hi
I need to select from a table field of upto 50 characters: the first 15 characters and then the remaining charachters (i.e. after 15...)
I would much apreciate some help...
Thanx
View 9 Replies
View Related
Nov 23, 2005
hi there
I'm building a forum from the scrath. It is already working, but I want to have in each topic the number of replies it has.
there are 2 tables, one for the topics and other to the replies. in the replies table there is a field called id_post that has the id of the post witch it belongs.
I solve the problem by inserting a query inside the loop of the posts:
<%
While Not rs.EOF
%>
<%
Set rs2 = Server.CreateObject("ADODB.Recordset")
sql = "SELECT COUNT(*) as cont FROM replies where id_post= " & rs("id") & " "
rs2.Open sql,Conn,1,2
%>
post: <%=rs("post")%> replies:<%=rs2("cont")%>
<%
rs.MoveNext
wend
rs.close%>
but someone told that this would make the page slower, so I want to know if I can do the same thing without having the query inside the loop.
I don't know if I made myself clear, sorry for that.
tks for the help.
View 1 Replies
View Related
Jul 17, 2014
I have a ticket database where tickets are added to access with no priority scores on them. Over time, meetings and discussions, those tickets are given scores through a form on my database. What I would like to do is somehow add a timestamp that shows exactly when a ticket went from being unscored, to having a priority score assigned to it. Note, before the ticket is scored; the Priority Score field is still blank. Null?
An idea I had was to somehow put a timestamp on the "Priority Score" field in my form that will only timestamp when that field goes from being blank to when it gets a number for the first time. It will not change the timestamp when that number is changed down the road. (We edit the priority scores, but I only want to know when the ticket was actually scored for the first time. This is for reporting purposes, how many new tickets we score each month, etc)
Could I do something along the lines of assigning code to the BeforeUpdate value of my Priority field on the form? Although I'm assuming this would put up a timestamp any time the field is altered afterwords also.
View 2 Replies
View Related