Tables :: Combo Box - Record Tagged With Two Items

Jan 16, 2014

So I've been reviewing cascading combo boxes and I am finding some good stuff. But here is a preliminary step I need. I need to tag each record with something like what month are they assigned in, and what products. Then I need the combo box to display what that month is that they are tagged in, and then populate the second combo box. It is the second combo box that will show the record on the form. Its possible that there will be two items they are tagged with.

View Replies


ADVERTISEMENT

Tables :: Select Multiple Items In Combo Box In Form?

Mar 6, 2015

I have a form with a combo box named 'Venue'. The combo box values comes from a Table with a list of about 200 countries. As of now a user is able to select only one country. However, I want users to be able to select more than one country.

View 1 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

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 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

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

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 :: 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 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 2 Replies View Related

Forms :: Update Record Based On Combo Box Choice And Related Tables?

Jun 3, 2014

In my database I have a table that keeps track of a package of items. The package is assigned a package type (counter display, end cap, half pallet, full pallet for example). The record of the association of the package and it's type is held in the main table.

Each of these package types is either a case or a pallet (counter display and end cap are cases and half and full pallets are pallets) This relationship is kept in another table (we will call it description table).

Now, based on the type of package and therefore it being a case or pallet a UPC and a GTIN number are assigned. The GTIN number is different if it is a case or is a pallet. I have a table that stores all of the UPC and GTIN numbers available in 3 columns, one for UPC, one for GTIN Case and one for GTIN Pallet (the UPC is a standard 12 digit and the GTINs are 14 digit -with the first 2 different to designate pallet or case. and all are based on the check digit formula necessary)

The user assigns the UPC and correct GTIN number by clicking a button which applies the next available UPC code to the package and determines if the description of the type (case or pallet) and inserts correct GTIN number into that field. I actually have all of this functioning correctly.

Now the problem. If a user changes the package type, and therefore changes the description, I need to add code to the update event of the combo box that gives the choices for package type that does the following:

Check to see if the original package type was a case or pallet (it's description) and if by changing the package type it is now changed to the other, update the record in the main table to the correct GTIN number based on the existing UPC Code.

OR as I write this, maybe the code could simply update the main table with the correct GTIN code based on the new description and the existing UPC code. This was I would not need to check for a change just do the update every time.

View 14 Replies View Related

Combo Box To Add Data Items Based Upon Table

May 13, 2005

I have a small database, that I would like to use a combo box to allow user to select a value based upon values already entered on table, and then if value is not found enable the user to enter a new value that will then become part of the selection for future record adds.

View 1 Replies View Related

Forms :: Combo Box Allowing Not In List Items?

Sep 29, 2014

I am using the following code in a textbox (CountryID) to show a country name (CoName) from a table (tblCountry). If the comboBox (cmbCoName) in current form (frmCountry) has no entry then CountryID remains blank, great. If I use the form to add a new entry then CountryID flashes because it does not recognize the entry. Can I use "or" to add another condition in the IIF statement so that it allows the "not in the combobox list" entry?

Code:
=IIf(IsNull([txtCoName]),"",DLookUp("CoName","tblCountry","Country_ID = " & [Forms]![frmCountry]![txtCoName]))

View 2 Replies View Related

Forms :: Change Items In A Combo Box Based On A Field

May 29, 2014

So I have a combobox that pulls values from a table. I am being requested to do an update to the database which means that I have to filter some values on that combobox based on a field on a previous form.For example:The main form is called "frmcontacts" and has a table field called "txttypeofcustomer" which can have two values: "customer" or "dealer".

The form that contains the combobox is called "frmnewissue" the combobox is called "cmbissuetype". "frmNewIssue" is opened through a button on "frmContacts". This combobox pulls the values from a table "tblissuetype". The values in that combobox are then: "Repair" "Return" "Question" "Replace".

If the value on txtTypeofCustomer is "Dealer" then all the values for the combobox remain visible. If the value of txtTypeOfCustomer is "Customer" then "Replace" cannot be visible or has to be greyed out.

View 6 Replies View Related

Tables &gt; 255 Items?

Mar 6, 2006

I've been running into this problem in Access. I have records which have more than 255 fields. The easiest solution would have been to get a table with more than 255 fields, but I can't do this, so I've had to split up the tables. The next easiest solution would be if there is a way to link the tables--I have a data field "IntAccNum" identified as the primary key in each table--so that when a new row is formed in one, it is formed in the others. This wouldn't waste space, since any row in the first table would necessarily need a corresponding row in other tables. Is there a way to do this?

If not...

The problem I run into is when I populate a row in the demographic table and then try to fill a corresponding row in another table. I use a command button to for a macro to "OpenForm", and then try to "SetValue" of the appropriate field in the second table. This adds a new row in the second table. This does let me populate the correct row of the second table the first time I try for each row. However, after this initial population, when I switch back and forth between the first and second table, I get an error in access since obviously I can't keep adding a primary key with the same value in the second table.

Do I need to do some sort of query to see if that row exists in the second table already. Or is there some simple solution to what must be a very common situation that I am overlooking?

View 4 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

Reports :: Sum Items From Two Tables?

Apr 11, 2014

I am trying to create a report in Access that sums the number of instances of items listed in two separate tables.

Tables:
Impact (Customer Impacted, Customer Not Impacted)
Reason/Source (Mail, Keying Error, Other Error, Transfer Error)

For example I am looking for the number of instances:
- Customer Impacted = Mail
- Customer Not Impacted = Mail

View 7 Replies View Related

Modules & VBA :: Combo Box Will Display Specific List Of Items - Form Asking For Parameter

May 5, 2015

I have the below code behind a form so that a combo box will display a specific list of items based on the data in another combo box on my form.

I have two copies of this same form for two different departments. One of the forms works like a dream. However, when I copy that form, change the name, and update the code as pictured below, the form is asking for a parameter FROM MY ORIGINAL FORM and will not requery the combo box. I can't figure out why...there is no reference to the original form in my VBA as you can see below. I tried deleting the form and re-creating it, I tried deleting the code and re-typing it to no avail.

Private Sub cmboType_AfterUpdate()
Me.cmboAction.RowSource = "SELECT tblStatusList.Status FROM tblStatusList WHERE (((tblStatusList.Department)=[forms]![frmInquiryFraud]![cmboType]));"
End Sub

View 4 Replies View Related

Cascading Combo Boxes - Open A Form And Add Multiple Items To A Table

Mar 12, 2011

I have been trying to modify a sample database to suit what I want to do but I am getting stuck on the very first part cascading combo boxes i want to open a form and add multiple items to a table - first i want to select, from a combo box a department - then select a supplier from all the suppliers/manufacturers related to that department then select a stock item based on the description from all the items available from that supplier

I have attached the database I am using to modify and my database.

View 5 Replies View Related

List Of Tables And Items In A Database

Nov 7, 2004

Hi just started working for a Company and I found they have tons of
databases but no structure or standard, so I would like to build a tool that will go thrue a list of databases and get all the table names, the items and type. Is there functions in vba that can get me a list of the tables in the database and the get all the items in the database ?

Thanks on any input

View 2 Replies View Related

Tables :: Associate Items With Second Names

Apr 15, 2015

I have items, but some of them have multiple names for one item. Is there any way to tell Ms access that that item has those other names? I have 5 fields, named "Model" "2nd Model Names" "3rd Model Names" "4th Model Names" and "5th Model Names."

View 12 Replies View Related

Design Problem - Filtering Combo Box Items Based On Related Table Field

Apr 19, 2007

Hi im stuck on filtering a combo box (i am using an sql query to populate a combo box with a filtered selection, this is in Access but im after some design sanity checking). I have users who can be assigned a category. Jobs can be assigned a category and also have a list of people working on that job (in the JobDetails table). I have the following tables:

Categories Table:
CategoryID (PK)
Description


Users Table:
UserID (PK)
Username
CategoryID (FK on Categories.CategoryID)


Jobs Table:
JobID (PK)
CategoryID (FK on Categories.CategoryID)


JobDetails Table:
JobID (FK on Jobs.JobID)
UserID (FK on Users.UserID)

Then in the job details when listing users for a job (many users can be for one job) i would like to only show the users which have the same category as the jobs category. Is this possible? i tried the SQL below for the lookup column field JobDetails.UserID but it doesnt work:

SELECT Users.ID, Users.Username, Users.CategoryID
FROM Users, Jobs
WHERE (((Users.CategoryID)=[Jobs].[CategoryID]));

All the tables are linked with relationships but my SQL isnt so hot!
Any ideas as to how i would do this and get it working?

Even if it can be done, is this even recommended? I can see funny conditions happening if the job details category changes or the users category changes then even if they are existing in the job details list they will not be shown? Even so, i would be interested in the above to know how it is done (if possible).

Thanks in advance,

Chris

View 2 Replies View Related

Modules & VBA :: Loop Through Record Set And Delete Duplicates Items?

Oct 20, 2014

If there a way i can remove duplicates from an email list? I pull these emails from a recordset. But i email may appear more than once and it doesn't look good e.g

johndoe@mail.com;johndoe@mail.com;jo...hndoe@mail.com.

I'd like to remove the duplicated email, if its possible. Code below.

Code:
Set rs = CurrentDb.OpenRecordset("select * from query")
With objMailItem
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs![email]) Then
vRecipientList = vRecipientList & rs![email] & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
.To = vRecipientList

View 6 Replies View Related

Tables :: Pound Sign For Specific Items In Notes Field

Jul 11, 2013

I'm having an issue with pound signs in my table for specific items. I've create a DB that when you click a command button it opens a form and in the form it has a notes field. In the notes field once where i had data is now pound signs.

The DB is setup so when you click another command button to close out, it saves the record. It works 98% of the time but the i'm concern about the other 2% of the time.

View 6 Replies View Related







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