Use Selection From Drop Down List As Parameter For Another Query.
Feb 4, 2005
I want to be able to choose an item from a drop down list (based on a query i.e. distinct products) and have the item chosen to be automatically used as a parameter in another query.
Thank you
View Replies
ADVERTISEMENT
Feb 23, 2014
When creating a query I have set up a parameter query as instructed (in this case searching for a name) but when I run the query it returns the error 'this expression is typed incorrectly etc.'
I have worked out that this must be due to the fact that the names are not typed in by a front-end user but need to be chosen from a dropdown list (which i have stored in a separate table) - So, the query seems to fail based on that.
View 10 Replies
View Related
Dec 8, 2004
Is there a way to add a drop down list to the message box in a parameter query so that users can enter a value(s) from the list in prompt? Thanks.
View 2 Replies
View Related
Jul 21, 2005
I have a form with a drop down list, when the user selects an option and press a button. I would like to add the value of the drop down list to a table as a new record.
Thx :mad:
View 2 Replies
View Related
Sep 15, 2013
Is there a way in which someone can select a table from a drop down list and then search that table for a record then move that record to another table.
For example.
User selects 'Mikey's_table' searchs for a record then move this selected record to 'Mandy's_table'
(all the tables have the same structure etc. identical apart from the name of the table and records within)
I have the list of tables that all the records will be on and the users will know which table the record is in, i basically need to know if there is an ability to search for a record over multiple tables then edit that record and move it to another Table.
I have tried to use a Union Query which works when searching but i cannot edit or move the record ...
View 1 Replies
View Related
May 25, 2006
Hello,
Ok, let me preface this with I'm a newbie at Access, and I'm currently using Access 2003. I'm just hoping someone can point me in the right direction. Right now I have multiple tables with set data in them that doesn't change linked to another table where I have a drop down menu (combo box I think it's called in Access) to easily select the given data from. I want to have a drop down box (combo box) to have a set of given variables I have in a table to put in the search criteria. That way a user doesn't have to type the exact criteria into a query. That way I can easily put in the variables I want to search from in the query with less chance of an error. I'm hoping this is possible.
Ideally if I could get help in how to make a form that would allow me to have the set of columns from the corresponding tables with combo boxes to select from and then be able to have a "subimt" button and have it organize the selected results into that form as well.
Thank you for taking time to read this.
View 2 Replies
View Related
Dec 7, 2006
Hi all,
I'd like to modify a query of mine a little ...
Currenlty, when I click on my query and have it begin ... I have it set up where I then enter three seperate pieces of distinct data so that the exact information I'm in need of, which is stored in 2 seperate tables, can then be pulled together and displayed into one final combined table ...
I'd like to modify this beginning point where ... once I click on the query to begin, I can then just choose from a Drop Down list which has all the various rows of information displayed via these 3 unique indentifiers ... I then just scroll through and pick what I need and it then populates the final combined table as before ...
How do I add the drop down effect at the start of the query?
thanks,
TIM
View 1 Replies
View Related
May 31, 2006
I'll admit from the start that I'm a newbie at Access 2003 and I've tried looking in the help file and internet searches. But I've become stumped on how to create what I'm looking for.
I would like to create a form that performs a query that has drop down menus with info from each specific column in a table. That way I don't have to necessarily need to know off the top of my head what data is entered in that column, but can click the drop down menu and get all of the data listed in that particular column. Once have a particular set of info selected, then have a button like "submit" and then the query results appear in a form and click through each page or results.
Is this possible?
View 1 Replies
View Related
Jul 27, 2005
I want to create a drop list, so I can do that:
I select an item from the drop list. I detect the ID of the item and, depending of this ID, I select some records from a table.
Can somebody help me?
View 4 Replies
View Related
Jul 24, 2007
so i have two listboxes that have the values i want for the query parameters. I slightly modified one code i found so that i can query using one of them, however i cannot figure out how to get the second listbox to put criteria into another field. The working code i'm using is:
Private Sub Command_Click()
On Error GoTo Err_Command_Click
On Error GoTo Err_Handler
Dim varItem As Variant
Dim strCriteria As String
Dim strSQL As String
For Each varItem In Me.PartyBox.ItemsSelected
strCriteria = strCriteria & "counterparties.counterparty =" & Chr(34) & Me.PartyBox.ItemData(varItem) & Chr(34) & " Or "
Next varItem
strCriteria = Left(strCriteria, Len(strCriteria) - 4)
strSQL = "SELECT counterparties.[Counterparty Entity], Fund.[Fund Name], products.Product, combine.[Available?] " & _
"FROM products INNER JOIN (Fund INNER JOIN (counterparties INNER JOIN combine ON counterparties.[Counterparty ID] = combine.[company id]) ON Fund.[Fund ID] = combine.[fund id]) ON products.[Product ID] = combine.[product id] " & _
"WHERE " & strCriteria
CurrentDb.QueryDefs("1").SQL = strSQL
DoCmd.OpenQuery "1"
Exit_Handler:
Exit Sub
Err_Handler:
If Err.Number = 5 Then
MsgBox "Must Make A Selection First", , "Make A Selection First"
Exit Sub
Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_Handler
End If
Dim stDocName As String
stDocName = "combqry"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command_Click:
Exit Sub
Err_Command_Click:
MsgBox Err.Description
Resume Exit_Command_Click
End Sub
I am trying to be able to search by Product and counterparty.
Any help is greatly appreciated, thanks!
View 8 Replies
View Related
Oct 27, 2014
I am designing a nomination form (web database so no vba macros can be used).
The form has 3 combo boxes: cboStaffName, cboLevel, cboNominee.
The form is bound to the tblSubmit table where the submissions are populated.
I used a select statement:SELECT Staff_List.Staff_Name FROM Staff_List; to populate the combo box for the Staff Name selection.
This is the select statement to populate the job level combobox:
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
The select statement to populate the combobox for the nominee combobox:
SELECT Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Level)=[forms]![frmtest]![cboLevel]));
The problem is that the staff_name in the first combobox is still found in the nominee combobox which should not be because a staff cannot nominate self. There is a field in the Staff_List called YesNo that should be activated for each staff that is selected so that the select statement on the nominee combobox can be updated accordingly to remove items with the field "Active"
How to get the checkbox selected for each corresponding staff.
Sample of the database has been attached.
View 4 Replies
View Related
Feb 10, 2006
Dear all, is it possible to run a query (or ideally a report) based on a selection from a drop down list in a form? (in accsess 97). The reson being is i have a big list of of codes for different absence reasons & at present the user has to type in the correct code to display the data in a report based on the code they enter, however its not easy for users to remember which code to type in to run a report.
Idealy what i would like is a drop down list with the absence codes & the absence desciption next to each code, then when the user selects a code from the list it displays the corresponding data in the report?
Is this possible?, any help would be much appreciated, thanks.
View 4 Replies
View Related
Jul 31, 2013
I have a query that allows the user to put in a date range - this works.He also wants to limit what he prints.
For example at the moment he gets
OrderA rest of line 1 for orderA
OrderA rest of line 2 for orderA
OrderA rest of line 3 for orderA
OrderB rest of line 1 for orderB
OrderC rest of line 1 for orderC
OrderC rest of line 2 for orderC
OrderD rest of line 1 for orderD
.
.
.OrderZ etc
He only wants to say print lines for OrderA and OrderD. It's he's choice and not based on anything else already in the table.
I see that in the criteria on the design for the query it allows me to bbuild an expression and I can select a list box on the form such as
[Forms]![name of form where list box is]![name of list box].[EXPRESSION VALUES]
I don't know which expression value to choose. I have tried afterupdate and beforeupdate but none of the rest look like they are the ones I should be using.
View 1 Replies
View Related
Nov 9, 2004
I'm currently use the statement below in a query.
Like [Please Enter the Cluster you wish to view] & "*"
This prompts you to enter in the information.
Is there a statement, that will prompt to select from drop down choices when quering?
For example, I have a database that tracks test scores. I want to be prompted when I run the query to select from a drop down 'Pass' or 'Fail'
Can anyone help me?
View 1 Replies
View Related
Sep 26, 2005
I need help to populate a certain selection from a drop-down (combo box).........OK I have a field named REP ID/REP NAME....(Rep stands for contractor)....Each Rep is assigned an ID and the first two numbers in the rep ID correspond to the territory in which they sell products...So for example 5830 John,Smith the 58 would be Northern California....Now what I want to create is a field named TEAM which would consist of Team A through Team D....Every Team is associated with different territory numbers to lets say I click 5830 John, Smith I would want Team A to automatically be populated in the TEAM field....Someone please helpp....And I hope I described it correctly
View 1 Replies
View Related
Aug 27, 2012
There is a field already that has a dropdown menu that a user selects from and there is a PDF on a fileserver that is associated with every selection possible.What I want is the PDF file to open automatically (or maybe a button to appear) once the user makes a selection from that dropdown menu.
So far what I have is a hyperlink field and a couple test links and a created button on the form with a sketchy macro I came up with (an if statement saying if the selection made = the selection field, look at the hyperlink and open it).
View 3 Replies
View Related
Jun 18, 2013
I'm using Access 2007.
So far I have a Multi Select enabled list on which the user selects the serial numbers they want. They then click the "Report" button which will trigger a query based on the selected serial numbers to create a report on those serial numbers.
I have the code for the multi-select list working already. It creates a string of comma separated values that are the serial numbers which are selected in the list. Somehow I need to pass this string to my query so it can use it as a filter.
Here is some of my code:
Code:
Option Compare Database
Option Explicit
Private Sub Form_Current()
Dim oItem As Variant
Dim bFound As Boolean
[Code] ....
Here's my current query in SQL:
Then finally how to I get the query to execute and create a report based on all of this?
View 11 Replies
View Related
May 15, 2013
Co-worker asked me if there was a way to add a drop down selection menu to a parameter box. Seems like ACCESS can do a lot of neat things.
View 14 Replies
View Related
Apr 14, 2014
I am trying to do the following. I understand how to create relationships.However, when I create a field with a drop down selection (in this example Phone Number and Email) once that list item is selected I would like the column to the right to populate that information.So when Phone # is selected, the field to the right will populate a number for this individual.
View 2 Replies
View Related
Sep 15, 2013
I have tab control form with (5) tabs. For this discussion - Tabs 1 through 5. For a blank (new) form sheet tabs 4 & 5 need to be hidden. Based on what is selected via the drop down box (on tab 1) then tabs 4 & 5 may remain hidden or needed to be un-hidden. Example: [DropDown1]
Selection 1: stay hidden
Selection 2: unhide
Selection 3: unhide
Selection 4: stay hidden
Selection 5: unhide
Selection 6: stay hidden
Selection 7: unhide
Selection 8: stay hidden
Selection 9: stay hidden
I think one I figure this out then I can use the 'OnCurrent' event to check the drop down selection as a user selects the a record or scrolls through records.
View 2 Replies
View Related
May 20, 2013
I am wanting to preempt data in list boxes
listbox1
Fruit
Vegetable
listbox2 (If Fruit Is Selected)
Apple
Banana
Orange
listbox2 (If Vegetable Is Selected)
Potato
Peas
Carrot
If Fruit is selected in Listbox1 - Then Listbox2 should have the options
Apple
Banana
Orange
If Vegetable is selected in Listbox1 - Then Listbox2 should have the options
Potato
Peas
Carrot
View 12 Replies
View Related
Oct 14, 2013
I have created a query with the parameter for the Domain field. however on the form the user enters this information via a drop down menu. i was just wondering could the parameter box be set to a drop down box as well to save the user entering in the full Domain field name?
View 6 Replies
View Related
Dec 18, 2007
I am creating a table in Access 2003, and I need to add a drop down list to one of my columns. See the attached picture - I need to add a drop down list to the "Division" column that will allow the user to select from one of 5 choices. How do I do this?
I'm an Access beginner, BTW. :)
View 14 Replies
View Related
Mar 18, 2008
Hello all!
I have a drop down menu that pulls values from a table. When clicked that value pops up in a total field. Currently I only allow 1 value to be selected. When the user (me at this point) chooses another value, the value is added to the total instead of updating with the new value. So the every time it is clicked it just goes up and up. So I decided to add a loop. However it seems my look is not having an affect but obviously it is being read since the first part is being processed. I thought I would post it to gather thoughts... Thank you!
Quote: Private Sub lstbagels_Click() Dim newcharge1 As Currency Dim newcharge2 As Currency Dim oldcharge As Currency If oldcharge = 0 Then newcharge1 = Me.lstbagels.Column(2, Me.lstbagels.ListIndex) Me.txttotal.Value = Me.txttotal.Value + newcharge1 oldcharge = newcharge1 Else newcharge2 = Me.lstbagels.Column(2, Me.lstbagels.ListIndex) Me.txttotal.Value = Me.txttotal.Value - oldcharge + newcharge2 oldcharge = newcharge2 End If End Sub
View 3 Replies
View Related
Feb 12, 2007
I have one more question:
I have a ComboBox in a form that is looking at a field in a Table. When I select one of the items from the drop down it finds the record and shows all the fields in the form...
Everything works great, but
THere are quite a few records in the database, maybe 1000. If I use the scroll on the drop down and drag it to its bottom and let go, its not actually at the bottom. I have to do this repeatably in order to get to the full set of records.
Is there and easier way to do this?
I have run into this on other occasions with smaller number of records as well.
Would this run faster if I grabed this list from a query instead? And then set the form record to the value of the drop down (runngin the query)
Thanks in advance...
View 7 Replies
View Related
Mar 18, 2008
Hi Everyone
I'm not too sure if this request is a query issue or not so please excuse if this is posted in the wrong section.
I am creating a database that picks up the start and finish time of each employee and displays the total hours worked by day and week.
I would like to be able to search by employee name from a drop down list but I am a unsure how to do this.
Can anyone assist?
Many thanks :)
View 1 Replies
View Related