How To Show Several Records In One Field
May 21, 2012
I have a table: Complaint
Within the table there is a field: CustomerID
There could be anywhere from 1 to 10 records with the same CustomerID.
I would like to show all the complaints for a specific CustomerID on a form in one field.
Right now I have the following Control Source Code:
=[Complaint.PartNumber] & ", ," & [Complaint.PNdescrip] & ", ," & [Complaint.Complaint]
This code will only display 1 record.
I would like the text box to look like this: (All from the same CustomerID number)
Part Number A PN Description A Complaint A
Part Number B PN Description B Complaint B
View Replies
ADVERTISEMENT
Oct 24, 2013
I want to filter my subform data, to only show records where field A is a higher value than field B.
Code:
Me.MySubform.Form.Filter = "A > B"
Me.MySubform.Form.FilterOn = True
This way it doesn't find field B.
Code:
Me.MySubform.Form.Filter = "A > " & MySubform.Form!B
Me.MySubform.Form.FilterOn = True
This way it seems to filter all record to the field B value of the first record.
View 5 Replies
View Related
Jun 8, 2006
Hi,
I have two tables:
tblOutTransmittals and tblTransmittedDocs. A document is sent with a transmittal document which the recipient signs to confirm that they received it. I've created a query that will show all the drawings/documents and the information about the associated transmittals.
What I want to do is show display records with a unique CCNum and preferably the one with the most recent TransmittalDate.
I've attached a screenshot and here is the sql:
SELECT tblOutTransmittals.CCNum, tblTransmittedDocs.DrawingNum, tblTransmittedDocs.RevisionNum,tblOutTransmittals. *
FROM tblOutTransmittals INNER JOIN tblTransmittedDocs ON tblOutTransmittals.DocID = tblTransmittedDocs.outTransmittalID
WHERE tblTransmittedDocs.DrawingNum="32-35554"
I've tried it using the DISTINCT keyword but that would only work if I'm returning one field. I tried Group By as well but couldn't get that to work.
Thank you,
RCurtin
View 1 Replies
View Related
Oct 25, 2012
I have txt input [txt choice] which has a number (1-9) and then a query which uses the following formula to define which records are visible linked to a Yes/No field
Code:
=IIf([Forms]![frm selection]![txt choice]="4",Yes,Yes or No)
If the choice is "4" then it works fine, but if the choice is anything but 4 it still shows only the Yes items. If i change the code to
Code:
=IIf([Forms]![frm selection]![txt choice]="4",Yes,No)
Then it does show just the 'No' items but i want it to show 'everything' if the choice is not 4
View 2 Replies
View Related
May 23, 2013
I'm a beginner trying to build a simple database for work. I'm trying to track the performance of bonds from month to month, in this case January-April. Each bond has a serial number called Serial_ID, but we wanted to create a record for each month we own the bond, so we created a primary key combining Serial_ID and start date called Serial_Start_Date. So if we own one bond, its January record would have a primary key of "4553123A 2013-01-01" and February would be "4553123A 2013-02-01". I created a form that allows a user to select one individual month's bond and display that month's return. However, I'm struggling to find a way to create a form that allows me to just select the Serial_ID and display the four month's records. Right now there is only one table in the database.
View 1 Replies
View Related
Nov 20, 2014
I need to write a query that shows all records if any 'L' field starts with D. I have written this, but it's only pulling records if L1 starts with D.
SELECT Item, Description, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12
FROM Table5
WHERE ((L1 LIKE 'D*') OR (L2 LIKE 'D*') OR (L3 LIKE 'D*') OR (L4 LIKE 'D*') OR (L5 LIKE 'D*') OR (L6 LIKE 'D*') OR (L7 LIKE 'D*') OR (L8 LIKE 'D*') OR (L9 LIKE 'D*') OR (L10 LIKE 'D*') OR (L11 LIKE 'D*') OR (L12 LIKE 'D*'));
View 14 Replies
View Related
Apr 30, 2014
I'm creating a form to count the number of employees with birthdays between 2 dates. There are 2 unbound date fields; Start_Date and End_Date. I have an Employee table with DOB field. I've been stuck on how to get the field to return the correct number of employees that fall within the 2 dates.
View 2 Replies
View Related
Aug 9, 2006
Hi,
I have a table with a field that shows the number of pieces that a parcel contains. It looks like this:
ParcelID, Pieces, Description
Data example:
1001, 5, Jackets
1002, 10, shoes
etc
I need to print labels for each piece that shows to which parcel it belongs. The report will look like:
1001, Total pieces = 5, 1 of 5 pieces, Jackets
1001, Total pieces = 5, 2 of 5 pieces, Jackets
1001, Total pieces = 5, 3 of 5 pieces, Jackets
1001, Total pieces = 5, 4 of 5 pieces, Jackets
1001, Total pieces = 5, 5 of 5 pieces, Jackets
and
1002, Total pieces = 10, 1 of 10 pieces, shoes
1002, Total pieces = 10, 2 of 10 pieces, shoes
1002, Total pieces = 10, 3 of 10 pieces, shoes
1002, Total pieces = 10, 4 of 10 pieces, shoes
1002, Total pieces = 10, 5 of 10 pieces, shoes
If I could populate a table where the number of records equal the value of the pieces column then it's a pretty simple report but I can't figure this out.
Can anyone help?
View 1 Replies
View Related
May 6, 2013
All. using 2010. I have a form and a subform. my master and child links are set but when I scroll thru my form; my subform does not change to show the matching records. I do have an unbound search field for the same field as the master and child links. When I type in the search field for a record; the subform does change to that particular record. Do you think that has anything to do with it?
View 1 Replies
View Related
Mar 8, 2005
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 I’m 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.
Can someone see where I’m going wrong?
Slaughter
slaughter at mizzou dot edu
View 9 Replies
View Related
Nov 16, 2004
I have built a qry that initially shows the correct information. For example.
tblContent has 289 records with a Type = Class.
I built a Query to select from tblContent Type = Class and I get 289 records. I add additional criteria of Progress <>"Not Scheduled", I then get 206 records. I then add additional criteria Last Name <>"Demo" And <>"Care" And <>"Support". This brings up 200 records, but the query appears to duplicate each record 3 times. I do not have 3 of the same types of records.
The SQL Statement is below
SELECT tblProfile.LoginName, tblProfile.FirstName, tblProfile.LastName, tblProfile.Organization, tblProfile.CostCenter, tblContent.Title, tblContent.Type, tblContent.Code, tblContent.[Date Assigned], tblContent.[Date Started], tblContent.[Last Accessed], tblContent.Progress, tblContent.[Date Completed]
FROM tblProfile INNER JOIN tblContent ON tblProfile.LoginName = tblContent.LoginName
WHERE (((tblProfile.LastName)<>"Demo" And (tblProfile.LastName)<>"Care" And (tblProfile.LastName)<>"Support") AND ((tblContent.Type)="Class") AND ((tblContent.Progress)<>"Not Scheduled"));
The qry is named qryPhysical Class. I have provided the link to view the database. Can you help me?
http://briefcase.yahoo.com/turnerbkgabrobins
Thank you in advance for your assistance.
View 1 Replies
View Related
Apr 26, 2006
Hi,
I have a table with an autonumber incremental ID field using the format 0000, 0001, 0002 all the way to 1530.
I'm trying to create a query that returns the last 5 records in decending order, so...
1530
1529
1528
1527
1526
any ideas?
Thanks.
View 2 Replies
View Related
Dec 4, 2014
I have a list of all previous employers for a job applicant. I can enter up to 10 but I only want the boxes to show if there is a previous position for that box. So, if there are 3 previous positions, I want to see 3 lines. If there are 10, I want to see 10. I have fields [Company_1]. [Company_2], etc. I only want company 2 to show if the person has 2 previous positions entered into the form.
View 1 Replies
View Related
Nov 8, 2007
Hi all
I have a subform which loads the items from a table the form is non editable just for viewing the items, the problem is how can i
A. limit the subform to only show the first say 10 items in the subform
B, to have a command button on the form where the the subform is on (command button not in the form) and when the user clicks it it goes to the next set of records say from 11 to 21 and displays that in the form.
i tried doing record cound but somehow record count is not there when selecting, also would the code go in the subfrom on load or on the form load where the subform is based?
any help on this would be appreciated.
thanks.
View 7 Replies
View Related
Sep 14, 2005
This is fairly simple i think although i cant do it right i have a field in a query named; "shiftdates" which uses the format: DD/MM/YYYY, how can i set the criteria for this to only show records from the past 7 days?
i think i need something like: date()-7 (this doesnt work though), anyone help me out?, :o
View 4 Replies
View Related
Jul 26, 2006
Hi everyone
My problem goes as followed:
As you can see in the picture there are 175 records currently showed. What I want to achieve is that this number is displayed in a Text Box.
Thanks in advance.
View 4 Replies
View Related
Aug 27, 2005
I have a querry designed to show loans that have a start date and an end date. I want my querry to show loans that have a start date, no end date, and that are 3 months old. Here is what I have so far but I can't figure out how to increment the 3 months on the start date:
SELECT Detail.CustomerID, Detail.TransactionID, Loan.LoanAmount, Loan.StartDate, Loan.EndDate, Loan.LoanLender
FROM Detail INNER JOIN Loan ON Detail.CustomerID = Loan.TransactionID
WHERE (((Loan.EndDate) Is Null))
WHERE ((( Loan.StartDate)) Is
Please help finish this line.
raydan
View 5 Replies
View Related
Feb 11, 2006
Hello All,
I’m using a combo box for the criteria for a saved query. Is there any way to show all the records if the combo box value is either “0” or null?
Thanks,
View 4 Replies
View Related
May 26, 2006
Dear All, I have a field named: “reminder date” in a query and would like to show only records where the reminder date is within the next week whenever the query is run (ie if todays date is 26th may 2006 and I run the query now It would only show records that include the following dates 27,28,29,30,31, july and 1,2 June)
Ive tried the below bit of code but this shows to many records beyond one week.
>=DateAdd("d",+7,Date())
Anybody have any suggestions?
Regards
Jim
View 8 Replies
View Related
Feb 20, 2007
Good day!
I'm planning to create a form that would show total number of sales transaction per week: If today's month is February, i would like users to see records like this: (Week should start on a Monday and ends on Saturday)
GroupNo______Week1_____Week2_____Week3____Week4___ _Week5___MTD
GroupA________12_________2__________10________11__ _____15_____50
GroupB_________8_________5___________7_________1__ _____21_____42
I can't find a sample code for this particular date criteria. :-(
Thanks in advance!
Sheila
View 6 Replies
View Related
Jan 24, 2008
I have a table for stock with two fields, KEY and DESCRIPTION; a table for manufacturers with two fields, KEY and NAME; and a third table which links to them both with a many-to-one join with three fields, KEY, STOCK-KEY and MFR-KEY. What I am trying to do is write a query that for a given manufacturer (entered via a parameter) shows a single line for all stock records that are NOT linked to it via the third table. I am sure it should be simple but all my attempts fail to exclude stock linked to the manufacturer if it is also linked to another manufacturer. Any ideas?
View 8 Replies
View Related
Mar 3, 2008
Is there an expression to show records in a query that are older than 6 months?
At the moment I have to go into the database every month and change the criteria date ie:
<#01/09/2007#
It would be much easier if it could do this automatically with an expression.
Can anyone tell me if ones exists?
Thanks
View 9 Replies
View Related
Oct 12, 2005
Hi
Just wondering if anyone could help me with my little problem :)
I am making a register (as in a class register of students) I have a table with the lessons on and one with students on. I have made a relationship between them etc.
I have a form where the parent allows you to choose which lesson you want to view, and the subform displays the students for that lesson. This all works fine.
My problem is that I also want a picture to be displayed for the student that is currently selected, I have managed to update the picture by using
Private Sub Form_Current()
[student_picture].Picture = [student_image]
End Sub
student_picture is the name of the image on the subform, the student_image is a row in my student database that contains the location of the image e.g. c:abc.jpg
and this works at updating the image that is show. The only problem is that the image is shown on all records/rows. Is there anyway of making it so that the image is only displayed on the current row?
Thank you
Neil
View 4 Replies
View Related
Oct 12, 2006
Hi,
I am trying to create a textbox that will show a document number of the last record so when a user clicks add new document he/she knows what document number to enter in next. It must not involve the user looking a subform with the document numbers on it.
Thanks for your time,
Leon
View 2 Replies
View Related
Oct 14, 2006
I have a feeling this is a common and probably easy question, but I couldn't find anything on it in the forums.
I have a main customer form with multiple subforms on it to keep track of my clients insurance policies and claims. I enter their contact data in the main form, and the policy data on one of the subforms. Then when they have a claim, I enter the policy information on the claim subform as well.
How could I have the combo boxes in the claims subform (which is storing data in a claims table) only show the policy numbers (stored in a policies table) assigned to that particular person? I would assume I need to somehow filter the policies query so it only shows records for that particular person, but I'm not sure how to do that on the fly.
View 6 Replies
View Related
Oct 12, 2004
Boy, I thought this would be easy! It's simple to show common records, but I can't seem to be able to withdraw uncommon records. They are the ones I want. I can do it the long way by bouncing one record against all the records of the other with an Iif statement, then creating another query that groups all those results (thousands) and eliminates the erroneous data by using a min or max statement as a filter. This results in very, very long calculation times. There has to be an easier way. Please help, because I'm goining to have to do this several levels deep, and it's bad at the first level already. Thanks in advance.
View 1 Replies
View Related