Background:We currently have a database which we use to track requests for equipment and track orders. In an item table we currently have a memo field called CPRNum which we use to track the numbers we assign to the equipment we purchase. For example "12345, 12346, 12347" etc. The results are based on the below query.
The Problem: We have been using this database for a year and have decided that it would be much more efficient if we can add the serial numbers to each cpr number for sending notifications/tracking. I created a new table that has a CPRnum, serial, ID(autonum), item fields. Item is linked to the Item(autonum) field in the item table. I figured out how to use this in a subform to add the pieces to each item, but now I have to alter the search form. My search form currently has about 21 fields that you can search on using as many of the fields as you want and it is working fine.
Question:
1)Is it possible to have a field for tagged, which will check to see if there is any CPR numbers listed and have "Yes" if there is, or if none(null) "No" instead of the CPR field?
2)How can I search for a CPRnum since it is no longer in that field, but rather in a separate table? is it possible to have it search the Serial table and return the Item ID? I am thinking of just adding a button to a CPR number search form.
I have had a few programming classes 15 years ago and a crash course in access from the internet, and I seem to have gotten stuck with the job of database master at work. It has been rough going so I appreciate all the time/help everyone offers. If any further info is needed please let me know. Thanks.
The Problem: We have been using this database for a year and have decided that it would be much more efficient if we can add the serial numbers to each cpr number for sending notifications/tracking. I created a new table that has a CPRnum, serial, ID(autonum), item fields. Item is linked to the Item(autonum) field in the item table. I figured out how to use this in a subform to add the pieces to each item, but now I have to alter the search form. My search form currently has about 21 fields that you can search on using as many of the fields as you want and it is working fine.
Question:
1)Is it possible to have a field for tagged, which will check to see if there is any CPR numbers listed and have "Yes" if there is, or if none(null) "No" instead of the CPR field?
2)How can I search for a CPRnum since it is no longer in that field, but rather in a separate table? is it possible to have it search the Serial table and return the Item ID? I am thinking of just adding a button to a CPR number search form.
Code:
SELECT Requests.[CGER Ticket], Items.Status, Items.Description, Items.[Budget Type], Items.[Budget Year] AS [Items_Budget Year], Items.[Special Features], Items.[Accesories / Options], Items.[Unit Price], Items.Quantity, Items.Manufacturer, Items.[Model #], Items.TotalCost, Items.[TotalCost w/OH], Items.RequisitionNumber, Items.ReqDate, Items.DeliveryDate, Items.Vendor, Items.PONumber, Items.PODate, Items.Buyer, Items.[CPRNum], Items.ReceiptedAmount, Items.ReceiptedDate, Items.[ReceiptedAmount w/OH], Items.ItemType, Items.SpecialProject, Items.Comments, Requests.Organization, Requests.Department, Requests.[Requester's Name], Requests.[End User Name], Requests.Section, Requests.Attention, Requests.[Budget Coordinator], Requests.Location, Requests.[MDS Code], Requests.RequestLink, Items.ID, Left(Items.[CPRNum],7) AS ShortCPR, Left(Items.[Description],200) AS ShortDesc
FROM Requests INNER JOIN Items ON Requests.[CGER Ticket] = Items.[CGER Ticket]
WHERE (((Requests.[CGER Ticket]) Like "*" & [Forms]![SearchForm]![RequestID] & "*" Or [forms]![SearchForm]![RequestID] Is Null) AND ((Requests.[Requester's Name]) Like "*" & [Forms]![SearchForm]![Requester] & "*" Or [forms]![SearchForm]![Requester] Is Null) AND ((Requests.[End User Name]) Like "*" & [Forms]![SearchForm]![EndUser] & "*" Or [forms]![SearchForm]![EndUser] Is Null) AND ((Requests.Section) Like "*" & [Forms]![SearchForm]![Section] & "*") AND ((Requests.Attention) Like "*" & [Forms]![SearchForm]![Att] & "*" Or [forms]![SearchForm]![Att] Is Null) AND ((Requests.[Budget Coordinator]) Like "*" & [Forms]![SearchForm]![BudgCo] & "*" Or [forms]![SearchForm]![BudgCo] Is Null) AND ((Requests.Organization) Like "*" & [Forms]![SearchForm]![Org] & "*" Or [forms]![SearchForm]![Org] Is Null) AND ((Requests.Department) Like "*" & [Forms]![SearchForm]![Dep] & "*" Or [forms]![SearchForm]![Dep] Is Null) AND ((Items.Description) Like "*" & [Forms]![SearchForm]![Desc] & "*" Or [forms]![SearchForm]![Desc] Is Null) AND ((Items.Comments) Like "*" & [Forms]![SearchForm]![comments] & "*" Or [forms]![SearchForm]![comments] Is Null) AND ((Items.Manufacturer) Like "*" & [Forms]![SearchForm]![cmbVendor] & "*" Or [forms]![SearchForm]![cmbVendor] Is Null) AND ((Items.Vendor) Like "*" & [Forms]![SearchForm]![vendor] & "*" Or [forms]![SearchForm]![vendor] Is Null) AND ((Items.[Model #]) Like "*" & [Forms]![SearchForm]![Model] & "*" Or [forms]![SearchForm]![Model] Is Null) AND ((Items.[Budget Year]) Like "*" & [Forms]![SearchForm]![BudgetYear] & "*" Or [forms]![SearchForm]![BudgetYear] Is Null) AND ((Items.[Budget Type]) Like "*" & [Forms]![SearchForm]![BudgetType] & "*" Or [forms]![SearchForm]![BudgetType] Is Null) AND ((Items.RequisitionNumber) Like "*" & [Forms]![SearchForm]![ReqNum] & "*" Or [forms]![SearchForm]![ReqNum] Is Null) AND ((Items.PONumber) Like "*" & [Forms]![SearchForm]![PoNum] & "*" Or [forms]![SearchForm]![PoNum] Is Null) AND ((Items.[CPRNum]) Like "*" & [Forms]![SearchForm]![CPR] & "*" Or [forms]![SearchForm]![CPR] Is Null) AND ((Items.Status) Like "*" & [Forms]![SearchForm]![Status] & "*" Or [forms]![SearchForm]![Status] Is Null) AND ((Items.ItemType) Like "*" & [Forms]![SearchForm]![ItemType] & "*" Or [forms]![SearchForm]![ItemType] Is Null) AND ((Items.SpecialProject) Like "*" & [Forms]![SearchForm]![SpecProj] & "*" Or [forms]![SearchForm]![SpecProj] Is Null));