Queries :: Dropdown Box - Find Records Based On A Form
Jul 16, 2014
I have a form with a dropdown box that shows the 'Group by' records in a table.
For example the form shows "Art_6". My table has many records (could be 1000's) that start "Art_6".
I want a macro/query to find all records that start "Art_6" and delete them.
How to find only those that start as described.
View Replies
ADVERTISEMENT
Aug 14, 2014
This may not even be possible, but I am looking to create a Query that can locate records in an Access Table based on 2 columns of data that I have stored in a CSV file.
My table contains several fields, 2 of which are "Dept" and "SKU" and has over a million records.
My CSV file contains 3 fields: "Dept", "SKU" and "Total" - total being the number of times that particular Dept/SKU combination is used.
I need to be able to parse the dept/sku values from each row in the CSV to the query and locate only the records that contain the same values in the Access table.
The plan being to delete out those that are identified by the query.
View 6 Replies
View Related
Jun 23, 2006
I currently have a form to manage inventory. On the left side of the form, I have a list box that shows all of the items in the database and finds the record on the form based on the selection.
I would like to have toggle boxes or something underneath the list box that when clicked will sort the box by vendor and item and another that when clicked will sort the list by part number and then select the record on the form based on the selection at that time.
I have no idea how to accomplish this...can anyone help?
View 1 Replies
View Related
Apr 7, 2015
I'm working on a database to organize and streamline the process that the manufacturing facilities in my organization use to request removal of defective product and raw materials. Currently all of the facilities send me their requests on individual excel spreadsheets via email, which are difficult to keep track of and report on since nothing is consolidated. What I've done is create a form in access that mirrors the current spreadsheet being used, so all the facilities have to do is enter the info into the access form rather than excel. The use of access is more for my benefit than theirs though, as it will keep track of the requests as well as make reporting on the request data much simpler.
When the facilities fill out the request form and select their facility number from a drop down list, I'm wanting them to be provided with a "Request ID" so that they may keep track of the progress of the request. The request ID should be a sequential alphanumeric value that includes the facility's three digit facility code, the last two digits of the year, and the number of the request. An example would be PL1-150001. The kicker here is that I want each facility to have it's own set of sequential numbers. So for example let's say I receive four requests in one week, three from facility 1 and one from facility 2. They should be assigned request ID's such as PL1-150001, PL1-150002, PL1-150003, and PL2-150001.
View 10 Replies
View Related
Jul 9, 2014
I have a price table:
Code:
tblPrice
PosNr PriceDate Company Price
1 01.01.2014 Firma A 5
2 02.01.2014 Firma A 7
3 03.01.2014 Firma A 9
4 04.01.2014 Firma A 8
5 06.01.2014 Firma A 6
6 02.01.2014 Firma XY 11
7 03.01.2014 Firma XY 9
8 04.01.2014 Firma XY 7
9 05.01.2014 Firma XY 8
10 06.01.2014 Firma XY 10
And I have a table with the dates, for which I need a price.
Code:
tblDates
PosNr PriceDate Company
1 01.01.2014 Firma A
2 02.01.2014 Firma A
3 03.01.2014 Firma A
4 04.01.2014 Firma A
5 05.01.2014 Firma A (no price available)
6 06.01.2014 Firma A
7 02.01.2014 Firma XY
8 03.01.2014 Firma XY
9 04.01.2014 Firma XY
10 05.01.2014 Firma XY
11 06.01.2014 Firma XY
And now I want to combine this tables, and for the dates which have no price, the last price should be taken.
Code:
tblResult
PosNr PriceDate Company Price
1 01.01.2014 Firma A 5
2 02.01.2014 Firma A 7
3 03.01.2014 Firma A 9
4 04.01.2014 Firma A 8
5 05.01.2014 Firma A 8 (actualy no priceavailable, so take last price)
6 06.01.2014 Firma A 6
7 02.01.2014 Firma XY 11
8 03.01.2014 Firma XY 9
9 04.01.2014 Firma XY 7
10 05.01.2014 Firma XY 8
11 06.01.2014 Firma XY 10
how I can get this?
I have this code, but it need hours.
Code:
SELECT tblDates.PosNr, tblDates.Company, tblDates.PriceDate, (SELECT TOP 1
B.Price
FROM
tblPrices As B
WHERE
B.Company = tblDates.Company
AND
B.PriceDate <= tblDates.PriceDate
ORDER BY
B.PriceDates DESC ) AS Price
FROM tblPrices RIGHT JOIN tblDates ON (tblPrices.PriceDate = tblDates.PriceDates) AND (tblPrices.Company = tblDates.Company);
View 14 Replies
View Related
Apr 13, 2015
I'm working with a form in Access 2013 that uses the navigation buttons. I'm trying to have my criteria for a query link to a dropdown box on the form. I had no problems doing this in Access 2010 with normal forms, but I can't link the criteria, in the query to the Navigation buttons form box. I'm tried using
[Forms]![TheNavigationTab]![NavigationSubform].[Form]![Field]
And various forms of the above... but i still can't see to tell the query to find the critiera at this location...
View 1 Replies
View Related
May 29, 2015
I have a table 45 fields. There is a field ID. I would like to get the records where fields contains "No". I would not like to create 45 queries for each field check. how can i generate a table which shows ID, Field Name that contains value "No".
View 4 Replies
View Related
Aug 3, 2013
I have the two tables in my access DB:
Property Information
Lease Information
I need to write a query which shows where a property does not have an associated lease, or where there is no current lease associated with it.
Property Info:
PropertyID
Address
Lease Info:
LeaseID
LeaseStartDate
LeaseEndDate
PropertyID (linked field to property table)
How to show expired / not current leases, but can't seem to show where there has never been a lease on a property.
View 4 Replies
View Related
Apr 2, 2014
I've got 2 tables, same structure, one [T-temp-Target] holds number of training units split by module a trainee needs to finish the course, the other [T-temp-Actual] holds what they've completed so far.
Both tables have structure
TRAINEEID
MODCODE
CountOfUnits
I'm trying to find the modules that they've not done yet so I can add up the units for them, only modules that have been started are recorded in the table of what they've done [T-temp-Actual], modules they haven't started yet aren't included in it. Here's the SQL
Code:
SELECT
[T-temp-Target].TRAINEEID,
[T-temp-Target].MODCODE,
[T-temp-Actual].MODCODE
FROM [T-temp-Actual] INNER JOIN [T-temp-Target] ON
([T-temp-Actual].TRAINEEID = [T-temp-Target].TRAINEEID) AND
([T-temp-Actual].MODCODE = [T-temp-Target].MODCODE)
WHERE ((([T-temp-Actual].MODCODE) Is Null));
View 2 Replies
View Related
Jun 4, 2013
I have a database for training. I have a table of employees with one of the criteria being active which is enabled by a check box. I have a second table of all of the training data. When I add a new employee, or I want to schedule someone, I want to be able to have a combobox on a form which I can select the type of training and then with a push of a button find if there is an active employee which has not had this training through results of a query.
View 14 Replies
View Related
Apr 24, 2015
I have a table of sales information. Part of my products are kits that are a combination of individual products. (Think of it as a value meal at a fast food restaurant. You can order a hamburger, a soda, and a small french fry separately. But if you get the Value Meal #1 you get all three at a discounted price.)
What I would like to do is make a new table/query that extracts out the kits out of the original sales table and replaces the kit record with records that show the components.
I have attached a file to show as an example of how the records current look and how I would like it to look.
View 8 Replies
View Related
Feb 1, 2006
I have a drop down box in my access database which I want to use to give completion dates to jobs, the drop down has three values:
Emergency
Urgent
Routine
emergency equates to 1 day
Urgent 7days
Routine 28days
I have had a dig in the help files and I can get the order completion date to show the terms emrgency, urgent and routine, however I nned to calculate the date, not just show the term, this where I lose track of how to get any further, I have searched the forum and cannot find an example, but perhaps I am not using the right search criteria, I have tried date calculation on drop down results etc etc and no dice, I am sorry if I am posting a question whichg has already been answered, and if anyone can post a link to a solution that would be great to.
Many thanks for your help this is my first post on this forum, but I am sure I will be here for a long tme to come access is fast becoming my life :D
again many thanks for taking the time to read this and I appreciate any help you can give me.
View 3 Replies
View Related
Feb 1, 2006
I have a drop down box in my access database which I want to use to give completion dates to jobs, the drop down has three values:
Emergency
Urgent
Routine
emergency equates to 1 day
Urgent 7days
Routine 28days
I have had a dig in the help files and I can get the order completion date to show the terms emrgency, urgent and routine, however I need to calculate the date, not just show the term, this where I lose track of how to get any further, I have searched the forum and cannot find an example, but perhaps I am not using the right search criteria, I have tried date calculation on drop down results etc etc and no dice, I am sorry if I am posting a question whichg has already been answered, and if anyone can post a link to a solution that would be great to.
Many thanks for your help this is my first post on this forum, but I am sure I will be here for a long tme to come access is fast becoming my life :D
again many thanks for taking the time to read this and I appreciate any help you can give me.
View 6 Replies
View Related
Aug 29, 2013
I want query to find duplicate records, i have two field in one table
Cusip and category
cusip and category are many or duplicates
but in one cusip category should be the same if not then provide the cusip which has different category used
like this
CusipCategory
123R
456P
123R
456P
678Q
678Q
123A
result should be
CusipCategory
123R
123R
123A
View 6 Replies
View Related
Aug 6, 2014
I have a table where csv files get imported to on a daily basis. The key fields I am working with are a supply number and date. The problem I have is that sometimes the csv file will contain information that is correcting/updating information held in the table. This is creating duplicated records.I need to either create a query to find records that have the same supply number and date or find a way of overwriting the records in the table with the new data.
View 2 Replies
View Related
Jun 1, 2015
I have an table that contains StudentID, Name and Age. I have imported the data from Excel sheet and there are some records which contains Null Value and some "h", "n/a" etc. I would like to design query which finds the records that are non numeric.
View 2 Replies
View Related
Jun 2, 2014
I am trying to add a combo box into a form and when the Combo Box wizard pops up I only get two choices:
I want combo box to get values from another table or query. I will type in the values I want
I want the third option...
Find a record on my form based on the value I selected in my combo box.
Why am I not getting the third option??
View 1 Replies
View Related
Nov 8, 2004
Can someone tell me how I migh find a record in a main form based a a selection in my subform?
I have a Main form called frm_ProductionSchedule.
It contains three subforms:
frm_ProductionSchedule_subform
frm_ProductionSchedule2_subform
frm_ProductionSchedule3_subform
I would like to be able to select a record within any of the subforms and have the main form display it. The main form is linked to a SQL server Table. The subform are based on queries. The unique PK field is a date field called record_date.
I should add that the Link Child/Master fields are blank for all Subforms. Each Subform is linked to a query and displays data for a particular machine (1,2 or 3) AND is updated based on a combo selection of the Production week. The queries for one subform would look something like this:
SELECT dbo_tbl_ProdSchedule.PartType, dbo_tbl_ProdSchedule.PartNumber, dbo_tbl_ProdSchedule.Work_order_no, dbo_tbl_ProdSchedule.FrameType, dbo_tbl_ProdSchedule.FrameNumber, dbo_tbl_ProdSchedule.Shift, dbo_tbl_ProdSchedule.Sch1_date, dbo_tbl_ProdSchedule.Sch1_spins, dbo_tbl_ProdSchedule.Sch1_sheets, dbo_tbl_ProdSchedule.Sch2_spins, dbo_tbl_ProdSchedule.Sch2_sheets, dbo_tbl_ProdSchedule.Sch3_spins, dbo_tbl_ProdSchedule.Sch3_sheets, dbo_tbl_ProdSchedule.Sch4_spins, dbo_tbl_ProdSchedule.Sch4_sheets, dbo_tbl_ProdSchedule.Sch5_spins, dbo_tbl_ProdSchedule.Sch5_sheets, dbo_tbl_ProdSchedule.Sch6_spins, dbo_tbl_ProdSchedule.Sch6_sheets, dbo_tbl_ProdSchedule.Sch7_spins, dbo_tbl_ProdSchedule.Sch7_sheets, dbo_tbl_ProdSchedule.Frames_due_date, dbo_tbl_ProdSchedule.Comments, dbo_tbl_ProdSchedule.Record_date
FROM dbo_tbl_ProdSchedule
WHERE (((dbo_tbl_ProdSchedule.Sch1_date)=[Forms]![frm_ProductionSchedule]![cmbSchDisDate]) AND ((dbo_tbl_ProdSchedule.SpinCoaterNo)=1));
AND WHERE ((dbo_tbl_ProdSchedule.SpinCoaterNo)=2)), etc. Respectively for each subform.
Thanks in Advance!!
John
View 4 Replies
View Related
Sep 18, 2013
how I can hide a combo box or text box based on whether the form is opened in a filtered view or not?
I have a form that can be opened in a filtered view showing only that record, or an unfiltered view showing all records. I want an extra drop down selection box to show only when the form is in an unfiltered view.
I am using Access 2010.
View 2 Replies
View Related
Apr 24, 2014
I'm trying to find a subform record from a separate pop-up form based on its ContractID. When I click the button, I get the following error:
"A macro set to one of the current field's properties failed because of an error in a FindRecord action argument."
When I step through the code, it works just fine. Here is my code:
Code:
'Find contract
With Forms!frmContractForm.frmContractSub
.Form.ContractID.Enabled = True
.SetFocus
.Form.ContractID.SetFocus
DoCmd.FindRecord Me.ContractID
.Form.Business.SetFocus
.Form.ContractID.Enabled = False
End With
View 1 Replies
View Related
Jul 27, 2005
Hi People,
I am working on a database related application in which the user enters the data from the form and it is stored in 3 related tables in DB.
This is what I want to do,
If IsNull(Me.Q1_2005) = True Or Me.Q1_2005 = "" Then
rs!January2005 = Me.Jan_05
rs!February2005 = Me.Feb_05
rs!March2005 = Me.Mar_05
If parametername = "time" then
rs!Q12005 = DMax([Me.Jan_05], [Me.Feb_05], [Me.Mar-05])
else
rs!Q12005 = DMin([Me.Jan_05], [Me.Feb_05], [Me.Mar-05])
End If
If user enters monthly data of Jan'05, Feb'05 and Mar'05, but he is not entering quarterly data of 2005 Q1. So I need to update Q1 data in that record, that has a condition. If the parameter name is time then I want maximum of the three month data assigned to Q1 record in DB table else I want minimum of those three text box values assigned to Q1 record in DB table.
Please help me with this kind of conditional statement.
Rushit..
View 1 Replies
View Related
Dec 22, 2014
I have a combo named cbogroup. I have a tblGroup with several records (active, non-active, nursery, etc.). One of the records is *ALL*. Using the CboGroup the user can pick any of the records. Howeverr, if they pick the *ALL* record, I want the query to pull up animalID based on all records in the TblGroup. If another record is picked (i.e. nursery), then the query will pull up only animalIDs that are in the 'Nursery'.Can I put a (iff then) in a query in order to differentiate a query based on all group records or a query based on only one record?
View 14 Replies
View Related
Mar 20, 2013
I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.
View 3 Replies
View Related
Apr 12, 2005
Hi to all,
I developed a database where I keep all the problems that I face and their solutions along with its category.
Now I want to have a form that when I choose each category, I should have all its records.
I heard that I should implement this by using a subform but I couldn't manage. With a search at the topics I've seen that I should use a macro but I don't know how to implement it.
Possibly after the lookup field I should have an After Update function but how can I connect it with the subform?
ex. at category "hardware: floppy" i have 2 records and i want to see only these, and when i choose category "hardware: hard disk" to have other 5 records of that category
Help plz?
View 9 Replies
View Related
Jun 28, 2013
I want whenever I'm updating or adding records to my form, the ID automatically take the value of the previous ID and increment it by 1.
The field type is text (mixed with number) - PM0000000.
I've done some research, what I understand is that I need to:
-do a lookup and
-find the MAX of the number portion.
Name of form - Payment
Name of table - Payment
Name of field - payment_id
I tried these, but to no avail...
Private Sub payment_id_Click()
payment_id = DLookup(("[payment_id]", "Payment", "[payment_id]=Forms![Payment]![payment_id]-1")payment_id + 1)
End Sub
[Code] .....
View 8 Replies
View Related
Nov 8, 2013
I have a form where someone enters a 'Job' to be done which in turn creates a record in a table with all this information
On the form I have a field called 'Repeat Frequency' where the user can choose how often they would like this 'Job' to repeat. e.g. Monthly
Then, on another form someone else can check what 'Jobs' should be done on that day
I have managed to get this to work fine using the DatePart function and it displays all jobs to be done that fall on the current day (e.g. if they choose to repeat it weekly, it will look for all entries where the datePart "d" [DateToBeDone] = Date()-7, -14, -21 and -28)
The problem is that i have been limited to the options of 'repeatability'
What i would like to do is change the options from 'Weekly', 'monthly' etc and instead have a field makrked "Repeat every so many days"
Is there a criteria i can use in a query where i can show records every so many days? i.e. if there is a job in the system that should repeat every 7 days and the [DateToBeDone] is set to 31/10/13, it would return this record on 07/11/13, 14/11/13, 21/11/13 and so on?
I Have tried DatePart ("d", [DateToBeDone]=DatePart ("d", (Date()-[RepeatDays] but what happens is it only shows it if the day is that many number of days in the past and not multiples as i said above.
View 7 Replies
View Related