Selecting Two Items For Query From Combo Box

Jul 22, 2015

I have a combo box that has three items in it. Name, ID_Num, Date

I need to use ID_Num and Date to filter the results of query. I can use one or the other but not both. I have tried ListIndex but apperently am writing it wrong in the expression builder.

[Forms]![TableName]![Combo0].

[ListIndex]????????????

I have tried =0, =1, =2 after the

[ListIndex] but it doesn't work.

How do I use two items from combobox in a query?

View Replies


ADVERTISEMENT

Selecting Items In Combo Boxes

Apr 30, 2005

i have a combo box containing dates, however it will only display the date at the top of the list, no matter which date is selected.
any help would be gratefully excepted!
cheers

View 2 Replies View Related

Selecting Multiple Items In Combo Box...

Feb 1, 2005

Is it possible to select more than one item in a combo box? I have attached a sample of a database I am working on. I have a table called Interests and on the Bookings form, I would like to be able to select more than one interest in the Interests combo box, but I can't figure out how to do it. In databases I have seen, you simply have to hold down ctrl or shift to make multiple selections - that's what I want to do.

Can anyone help, please?

Thank you!!

View 13 Replies View Related

Forms :: Populating Text Box Upon Selecting Multiple Items In Combo Box?

Nov 28, 2014

Now I have a combo box "cbo_items" and a text box "txt_selectedItems", I want to populate text field with items selected from the combo box, every time i select an item it appears in text box and to be separated with comma, so text box appears like this ( item1, item2, item3), and after finishing the whole thing the result appears in lable "lbl_result" as "total items selected: 3 items".

View 1 Replies View Related

Selecting Two Items From A Single Field

Jan 2, 2007

I want to be able to perform an AND search on a field where both specified values must be present for an item to be selected.

I have a table with some properties of items. Each record in the table is for a specific item and one of its properties. Say for instance that I want to list the items that are described with both "red and green". Assume that there are entries for widgetA to widgetG with colors "red, blue, yellow, purple" and widgetB and widgetE also has the property "green" in addition to the others ... the query should return widgetB and widgetE only.

I tried to use MSAccess 2003 query builder but cannot get the AND result to work. I switched to an OR and verified that the two values I am searching for do exist for two items in my table.



Here is the SQL statement that did not work.
SELECT Properties.PropertyIndex, Properties.HerbOilLink, Properties.PropertyTypeIndex, Properties.PropertyDescriptionIndex
FROM PropertyType INNER JOIN Properties ON PropertyType.PropertyTypeIndex = Properties.PropertyTypeIndex
WHERE (((Properties.PropertyDescriptionIndex)=80 And (Properties.PropertyDescriptionIndex)=15));

View 3 Replies View Related

Selecting Multiple Items On Combobox

Nov 23, 2006

Hello to all .

Have you got any idea ?

I have a List Box in a table and it is set to permit multiple items selection
from it .

The fact is I can select, as I wanted, multiple items from it through
the Form but when I go to the correspondent table to see the results
the selected data from the List Box isn't there .

Note all data selected from the List Box is visible trough the Form but
not the table .

Has this problem anything to do with mismatch in data type configuration on the table ?


Lots of thanks in advance

Miguel

View 1 Replies View Related

Selecting Multiple Items For Email

Jan 30, 2007

hello once again
Scenario:
I currently have a form that the users can browse through listings of items for sale. While going through the records, they can mark with a checkbox of which items to include in a report to send in an email. The check box is currently part of the listings table, and i then run a query to pull items with the box checked, then put those in to a report, then they can email.

Problem:
about 5 users use this database, so if one user is selecting items that they want it's going to cause a problem for another user to select only the items he wants since it is all updating to the same table. Ex, if I select items 2 and 3 and another person selects items 4 and 5, when I click to show the report, its going to show items 2,3,4,5. Make sense?

Solution:
Since there are only 5 users, I made them all aware of this, and also created a reset selected email checkbox button, that sets the checkbox back to unchecked so the next person can select their own items and email. There has to be a better way to fault proof this, I just can't think of one. Any ideas would be greatly appreciated!

View 2 Replies View Related

Selecting Items And Automating Actions

May 19, 2012

I have a report, which shows all unsold items for a particular auction date, and I have created a form using this report.

I'd like my sister in law, to be able to go through and easily select which items to relist, and which to return.

I've tried using a subform, but I've either not done it correctly, or its not quite the right tool for the job. I've tried listbox control but can't get it to work properly either.

Once she has gone through the list ticking one or the other, I'd like to be able to automate with a button "Relist" and a button "ReturnItem".

I'd like Items to be returned - to automitcally close item off so it no longer incurrs a weekly listing fee and change status to "ReturnToSeller" and the relist ones, to create a new entry line into the main item table, with replicated information, except it clears out the "lot number", as they enter that manually when the generate a new list for the next auction, my ID numbers remain current and unchanged but the tableID is automated to a new one which is my key number.

then on my invoice, I get for instance, 3 rows for one Item, which could have 3 different lot and ID numbers, and get a listing fee of £1.20 for each week you see.

How can I automate the actions to relist and Return to Seller?

View 3 Replies View Related

Forms :: Selecting Between One And All Items In A Parameter Control?

May 25, 2013

I have a Parameter form which provides various parameters to my queries. The Parameter Form has a Combo box with a list of 50 health facilities which the user can select according to their needs.

There are instances when a user needs data from just one health facility and at times the data is needed for all the 50 health facilities in the district.

How do i address both needs without having to keep adding and deleting the criteria in the underlying queries?

I have added the 'if' condition below in the queries criteria so that if the user does not enter a facility in the combo box, it runs all facilities and if they enter a facility name then the data in the reports is limited to that health facility.

IIf(IsNull([Forms]![Parameter Form]![Combo27]),"",[Forms]![Parameter Form]![Combo27])

It does not work.

Is the expression or VBA code supposed to be entered in the Query or in the Parameter form and how do I make it work?

View 7 Replies View Related

Combo Box Items In A Lookup Query

Jul 18, 2007

I have a Combo Box based on a table list on a Form. I want to choose several items from the list to feed a Lookup Query. Can this be done? :rolleyes:

View 1 Replies View Related

Selecting Query Criteria From A Combo Box.. Please Help!!!

May 17, 2007

Hi all

I am trying to get my head around some of the more advanced “features” of access..

At the minute I am trying to change the criteria of a query from selecting a value from within a combo box.. I believe I have got the syntax correct, but I keep getting no results returned..

I am using:
[forms]![frmMovies]![combo2] as the criteria where frmMovies is the name of the form, and combo2 the name of the combo box.. I have set combo2’s source as the table containing the movie information “tblMovies”
Before you ask I am not trying to setup my own movie store, more apply the theory to a bigger DB that I am working on :-p

Hopefully you can help, as I have now been scouring the forums for 2 days and am getting no where..

Thanks in advance

Noel

View 2 Replies View Related

Display Records Of Select Query After Selecting Desired Data From Single Combo Box

Nov 13, 2011

I created a subform that displays the records of a select query after selecting the desired data from a single combo box (for instructors name) and then using an OpenQuery macro attached to a button.

Only 1 record is displayed in the subform each time I hit the button. If I look at the query return there is no change. However, if I close the query and select a new instructors name, although I only get one record in the subform, the query when opened shows all the correct records.

What is wrong with my macro/subform?

View 8 Replies View Related

Filtering Combo Box Based On A Value From Another Combo Box (in Multiple Items Form)

Mar 11, 2012

Let's assume we have 3 tables:

Order_Category (Order_Category_ID, Order_Type_Name) with 2 records:
1, Minor
2, Major

Order_Type (Order_Category_ID, Order_Type) with 4 records:
1, Book
1, Pencil
2, Car
2, House

Orders (Order_Category_ID, Order_Type, value) with 2 records:
1, NULL, NULL
1, NULL, NULL
2, NULL, NULL

I want to create a Multiple Items form presenting Orders table with two Combo Boxes:

1. A combo box to select Order_Category_ID.
2. A combo box to select Order_Type. When 1 (Minor) is chosen in the first combo box it should show Book and Pencil, when 2 (Major) is chosen it should show Car and House.

Examples in the Internet show how to do it on a 'single row' forms using the RowSource property. I tried to use a query like:

SELECT Order_Type
FROM Order_Type
INNER JOIN Orders ON Order_Type.Order_Category_ID = Orders.Order_Category_ID
WHERE Order_Category_ID = [comboBoxOrderCategoryID]

But it sets same values for all records in the Multiple Items form and it should return different values in each rows based on value in the first combo box (Order_Category_ID).

View 5 Replies View Related

Selecting From Combo-box

Nov 8, 2006

I have a quick question on Forms. I have a combo-box in a Form that displays the student ID, first name, last name, and test scores from a source table. I have selected only specific fields to display from the source table in the combo-box. The intention is to note down the ID of a student for future querying purpose and I’m looking at easier ways to do it.

The question I have is, as I look down the drop-down and select a student by his last name (say Johnson), I want the student ID to be selected (or copied) when I click the specific student. There could be many students with same last name, and once I select a particular student from the drop-down, I was wondering if there was a way for this ID to be copied or selected. At present, the student ID is written down and used later for querying other information.

Thanks in advance.

View 1 Replies View Related

Selecting Item From Combo Box

Jun 5, 2005

Not sure what to search for so I thought Id write a new post:

I have a combo box which selects 3 items-

Primary key, Surname, Firstname

After an item is selected, the fields are populated according to the item.

Since there will be many records, it would be nice if the user can begin typing the surname and have predictive text, so the three items should then be-

Surname, Firstname, Primary key

So my question is, how do I get at the primary key if it is not selected?

myText = dlookup("myValue", "myTable", "primarykey = '" & ???? & "'")

If this does not make sense, what I am trying to say is:

The surname is selected, but I want to do a calculation based on the primary key so I get all the data associated with that user. I cant use the surname because there are duplicates.

Thank you

View 2 Replies View Related

Selecting Records Using Combo Box

Feb 16, 2005

Hi,

ok part of my database is made of 2 tables.

tblItems
item_id
maunfacturer_id
supplier_id
item_name

tblQuantities
quantity_id_num
item_id
quantity

(item_id linked)


ok so I want a form that has a combo box with [item_id, item_name] on each row that i select. when i select one it displays the relevant quantity and allows me to edit the quantity.

any ideas how i can do this?

Thanks:)

View 3 Replies View Related

Selecting A Month From A Combo Box

Jul 7, 2006

Hi,
I was wondering if it was possible to use a combobox where you could select a month and year (eg March 2004, April 2004) so I could run a query to find orders made during the chosen time period.

Does anyone have any ideas how this could be done?

Cheers,
Ben

View 1 Replies View Related

Forms :: Selecting More Than One Value From Combo Box

Feb 3, 2014

In Access 2013, I would like to be able to choose more than one value from a combo box, but I believe this is not possible. However, I can prepare a list box and set the Multi Select to Extended. Doing this, I can indeed select more than one value, but I don't know how to get those values into a text field in the form. (If poss, they would become comma separated in that field). Ideally, the code would call the list box because it would take up too much space if it were there all of the time.

View 2 Replies View Related

Adding Items To Combo Boxes

Sep 4, 2005

Hey Guy and Ladies,

In one database (Originally an Orders Database created by wizards)

This code to add items to a drop down list in the “orders details subform” works fine.


Private Sub ProductID_DblClick(Cancel As Integer)
On Error GoTo Err_ProductID_DblClick
Dim lngProductID As Long

If IsNull(Me![ProductID]) Then
Me![ProductID].Text = ""
Else
lngProductID = Me![ProductID]
Me![ProductID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!ProductID.Requery
If lngProductID <> 0 Then Me![ProductID] = lngProductID

Exit_ProductID_DblClick:
Exit Sub

Err_ProductID_DblClick:
MsgBox Err.Description
Resume Exit_ProductID_DblClick
End Sub

When the same code runs in my new database

Private Sub OptionID_DblClick(Cancel As Integer)
On Error GoTo Err_OptionID_DblClick
Dim lngOptionID As Long

If IsNull(Me![OptionID]) Then
Me![OptionID].Text = ""
Else
lngOptionID = Me![OptionID]
Me![OptionID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!OptionID.Requery
If lngOptionID <> 0 Then Me![OptionID] = lngOptionID

Exit_OptionID_DblClick:
Exit Sub

Err_OptionID_DblClick:
MsgBox Err.Description
Resume Exit_OptionID_DblClick
End Sub

I get the error message

“You tried to assign the Null value to a variable that is not a Variant date type”

Any suggestions?

Also if anyone knows a better way to add items to a list box “On the Fly” I would really appreciate it.

It would be nice if you could type in the value and it would automatically add it to the list for future use.

Thanks for all of your help,
Joe

View 7 Replies View Related

Filtering Out Items In Combo Boxes

Aug 3, 2006

Need some help here....

I am designing a database to keep track of workers for a haunted house. I have a Roster table, a table of all the nights we are open, a table of Spots in the house, and a table to record who works what nights and what spot they are in. This table has a Room combo box and a Spot combo box. The Room combo has a Row Source of SELECT DISTINCT SpotsAll.Room FROM SpotsAll ORDER BY SpotsAll.Room; The Spot combo is then populated with VB code all the Spots that are in that room. That works fine. This is what I'm trying to accomplish: When a Spot is assigned to a Worker for that night, I want that spot to no longer be available in that list FOR THAT PARTICULAR NIGHT. So, lets say Joe Somebody works in Spot 1 (out of 4 lets say) of the Library Room, when we assign another person to the Library room, I don't want Spot 1 in the Spot list.

Can this be done with a query or VB code? If I'm not making sense, please let me know. I can also upload the Database I am creating so that you can play around with it and see what I mean.

(I have attached a word doc. that shows the table relationships.)


Thanks a lot ahead of time!!
ScrmingWhisprs

View 13 Replies View Related

Forms :: Limit Items In A Combo Box?

Aug 12, 2013

I have a combo box in which I wish to show the Person_ID's of every record in the table TBL_Person, except those which are returned by a separate query. Is this possible at all?

View 1 Replies View Related

Forms :: Counting Items In Combo Box

Aug 27, 2013

I have a form that has three cascading combo boxs, plus a subform. The third combo has a list of questions, and you put your answer in the txt box in the subform.

What has to happen is that the combo box has a number of questions and each has to be answered, is there a way to know if all these questions have been answered by knowing what listindex or listcount ect that has be used and to have something set to advise the user that there are more questions and what ones are to be answered.

View 3 Replies View Related

Forms :: Combo Box With 3 Items Not Displaying

May 7, 2013

I have two synchronised combo boxes that are working brilliantly except for 1 thing.

The two boxes are Site and Building. I find a site from the Site box dropdown and only the buildings for that site are shown in the Buildings box dropdown. Perfect!

However, I have got 3 fields showing in my Buildings dropdown.

Private Sub cboSite_AfterUpdate()
Me.cboBuilding.RowSource = "SELECT BuildingName, BuildingCode, Status FROM " & _
"BuildingT WHERE SiteID = " & _
Me.cboSite & _
" ORDER BY BuildingName"
Me.cboBuilding = Me.cboBuilding.ItemData(0)
End Sub

that is BuildingName, BuildingCode and Status.

All three show in the dropdown
BUT
only BuildingName shows in the actual Building Box and I would like all 3 to be visible once I have decided on the building name I need!!

Can this be done by changing

Me.cboBuilding = Me.cboBuilding.ItemData(0) (as above)
to
Me.cboBuilding = Me.cboBuilding.ItemData(0), Me.cboBuilding.ItemData(1), Me.cboBuilding.ItemData(2)
or something similar??

Or do I need to create 2 new boxes to return the other values?? I am so close to achieving what I want with this form!!

View 3 Replies View Related

Selecting Entries In Combo Box That Aren't There

Jul 14, 2006

I seem to remember that there is a way, in a combo box, of entering an entry that isn't displayed in the combo box, so that you can then process that entry into a form's underlying table?

I think the example of doing this was in the MS Samples database for either Access 97 or Access 2000.

Does anyone recall what I'm talking about? Second question, does anyone have a link to those sample databases? Our technicians didn't bother loading the samples for us, so I'm kinda stuck.

Thank you tremendously to any and all who reply..... I'm looking forward to your responses!

View 4 Replies View Related

Update A Form By Selecting From A Combo Box

Apr 13, 2005

I have an unbound combo (because it is synchronised with another unbound combo box) box that selects a record, but I can not get it to update the rest of the form to show the required data.

The form looks up project data from 3 seperate tables which are all linked by relationship.

What do I need to do to make this work?

Thx for looking.

View 2 Replies View Related

Selecting Multiple Records From A Combo Box?

Jun 15, 2006

Is it possible to have a combo box on a form and allow users to select multiple entries from the drop-down list? Thats just the tip of the iceburg. If you can, then I'll probably be asking more questions soon.

Thanks in advance.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved