Select From List BOX Of List Of Choices And Store This Into A Table

Aug 21, 2013

I created a form and created on it a list box which is a query that grabs certain number of fields from different tables. I would like the user to select from this list box of a choice and then store their selection into a table.This list box has three fields, but it needs to store the id rather than the item, the user would see the name of the item but the id of the item would be store into another table, called bid. It store all these three fields when a user selection one of the item from the list.

View Replies


ADVERTISEMENT

List Multiple Choices In Combo Box Once

Feb 13, 2006

I have 2 cbo boxes : Year and Company

A certain year might have multiple entries for the same company. I want to have the company listed once instead of multiple times. How do I do that?

Thanks.

View 2 Replies View Related

Use Multi-select List Box To Filter A Report With Two List Boxes

Nov 20, 2013

Allen Browne's "Use a multi-select list box to filter a report" solution, in particularly with two multi-select list boxes? The code works fine for me for either box so long as I code it for one box alone. Combining the two into one code results in a type mismatch error. I'm trying to use the code to pass the contents of both multi-select boxes as Where conditions to a report. Both boxes are based on number fields. To try to isolate the problem, I've removed Allen's setDescription and OpenArgs conditions. We're unfortunately still on Access 2003 as the company desires to squeeze every dime by using until end-of-life next year.

Code:
Private Sub cmdPreview_Click()
On Error GoTo Err_Handler
'Purpose: Open the report filtered to the items selected in the list box.
Dim varItem As Variant 'Selected items

[Code] .....

View 14 Replies View Related

How To Transfer Multiple Select Item In List Box To Another List Box

Jun 2, 2012

How To Transfer MultipleSelect Item In Listbox to another Listbox ?

View 7 Replies View Related

Forms :: Combo Box Where List Of Choices Are Narrowed In Real Time As You Type

Sep 29, 2014

I would like to create a combo box (or something similiar if a combo box simply can't do it) where the list of choices in the pulldown shows only the matches of what a user types in. The list of choices are coming from a field in a table. Also I would like the "search" of the user's input to include what is "within" each choice, e.g. if a user type "ber", then valid results should be bertha, october, robert.

View 1 Replies View Related

Updating A Table From A Multi-select List Box

Mar 26, 2012

I am trying to make a simple database where the data entered in a form will update to a table. My issue is, one of the fields is manufacturing location where I would like the user to be able to enter multiple locations and then have those locations update the table where the record is stored. I've been able to set up a list box with multi-select but am stuck at getting the table to update with the choices made from the list box selection.

View 2 Replies View Related

Store Multiple Values From List Box

Jan 11, 2006

Hi all,

I was thinking/hoping of using a list box on my form to store multiple values, I haven't been able to find a way of storing any value so far so not sure how easy it will be?

How can this be achieved or is it just easier to use several check boxes (approx 8)

Thanks

View 3 Replies View Related

Store Multiple List Box Selection In Text Box

Jan 11, 2007

I created a button that when pressed concatenates any items selected in a list box and places them in a text box on the form with the format of "itemselected1" or "itemselected2" or "itemselected3"

However, I need to set the criteria in a query to look at this text box and return the results based on that selection. When I do that I get no results even is the query should run fine with that type of format.

Attached is a copy of the Code for the button and the result
Dim txtValue As String
Dim varItem As Variant
Dim strlnameselect As String
Dim intCount as Integer
'Cycle through selected rows in listbox

For Each varItem In Me.Queueselect.ItemsSelected
intCount = intCount + 1
Select Case Len(txtValue)
Case 0
txtValue = Chr(34) & Me.Queueselect.ItemData(varItem)
Case Else
txtValue = txtValue & Chr(34) & " Or " & Chr(34) & Me.Queueselect.ItemData(varItem)
End Select
If intCount=Me.Queueselect.ItemsSelected.Count Then
txtValue = txtValue & Chr(34)
End If
Next
'Assign variable value to textbox
Me.Queuetorun.Value = txtValue

End Sub

the result in the text box is
"A" or "B" or "C" or "D"

View 3 Replies View Related

How To Store ID On List Box But Show Related Data

Oct 10, 2012

I have 2 tables one, Contacts, primary key ContactID this table contains names, addresses etc and one group called Form primary key Form ID, foreign Key Contact ID. I want to store the related contact ID in my form but display firstname ad surname from Contaacts list. This works fine when I am selecting name. List box shows 2 columns with correct data but when I recall the form after making other entries it only displays the firstname. The correct ContactID is stored. Why does this happen.

If I can get this working I would like to concatenate the Firstname and surname to make it more readable but don't know where to begin.

View 3 Replies View Related

Modules & VBA :: Using Array To Store Selected Items In List Box

Apr 10, 2015

I want to use an array to store data from a list box into a variable. I want it to be able to store one value, or multiple values, depending on what is selected.

Main problem: this list box feeds off a table which has employee names and their e-mails. The list box itself only shows the names, and when I select what I want the array to store is their e-mails, not their names.

Code:
Dim strNames As String
Dim varItem As Variant
Dim intCount As Integer
For Each varItem In Me.lstNames.ItemsSelected
intCount = intCount + 1
Select Case Len(strNames)

[Code] ....

That code successfully displays the item I selected, but only displays the name. I need to make it look in the table and get me column #2. I also want it to be able to select more than one item at a time.

View 5 Replies View Related

Create A Randomise List From A Table And Save The List For Each Month

Dec 14, 2006

Hi All a newbie here so any help will be appreciated,

sorry for the long post but trying to give you all the information you might need.

I wrote a basic access database for my Church to aid in a paperwork audit for a charity food drop which we do monthly to give free food to the needy.

But each month it gets harder to find out who was in line first so I thought with all your help we may be able to randomize the names each month in a different order as to avoid confusion and also avoid people waiting in line as they turn up at 5am and we don't start until 9am.

So if this will work in access they can all come for 9am

I don't mind creating a new database and adding the additional information, if that's what it would take.

My Background I have created basic databases from scratch not using wizards, But I don't know much about code or how to implement it so any help in where code goes it would be very much appreciated.

Database details (Microsoft Access 2002 version)

Table Name = details
Field name = ID (auto-generated)
Field name = FirstName (text)
Field name = Surname (text)

If possible it would be nice to keep a record of the randomized lists (in the database somewhere ?) each month in case anyone wants to see it or disputes the lists, where I can just create a report to show the details.

There will be approximately 90 to 125 names.

Thank you in advance for all your help in this matter

Britgent

View 1 Replies View Related

Tables :: Check Box Field - Store Only Two Possible Data Choices

Oct 7, 2014

Is it possible to create a field in a table that stores only two possible data choices: a check or null value ?

View 6 Replies View Related

Modules & VBA :: Programmatically Find And Select Item In Multi Select List Box

Apr 23, 2015

I have a multi slect list box (simple) and I need to find and select an item using vba - e.g., the bound column is the ID field and I need to select a specific ID (which will be different each time) as opposed to selecting the 100th record for example. How do I do this?

View 2 Replies View Related

List Table, Limiting Field List..

Oct 14, 2006

Okay,

The subject is probably confusing but I'll try to explain.
Setup:

Table1
FieldID = Number
FieldName = Text

Table2
FieldID = Number
FieldName = Text
T1_ID = Number

Relationship
Table1.FieldID 1-> * Table2.T1_ID (one to many)

Now, I'm trying to create a 3rd table that has field populated by Table1 and a field populated by Table2 but I want to limit the field populated by table2 by what is selected in the field populated by table1.
Table1:

1st
2nd
3rd
4th

Table2:

1st,January
1st,February
1st,March
2nd,April
2nd,May
2nd,June
3rd,July
3rd,August
3rd,September
4th,October
4th,November
4th,December


Table3:
Table1Field = Number, ComboBox-Source: Table1, BoundColumn=1
Table2Field = Number, ComboBox-Source: Table2, BoundColumn=1

If Table1Field = 1st then
Table2Field Will only allow January, February, or March as selections, since ONLY they are a member of the "1sr" group via the table1 list.

Is this possible, or do i have to do some run-time checking or something?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner

View 1 Replies View Related

List Box One Click Select/deselect With Multi Select

Aug 28, 2004

Hi,
is there any (reasonably simple) way to select or deselect multiple items from the List Box with individual clicks without using Ctrl key. Eg first click on an item would select it leaving all other items as they are, subsequent click on the already selected item would deselect it etc. I hope this is not too confusing and I would appreciate some help.
Thanks!

View 1 Replies View Related

Select From Value List

Mar 30, 2006

Hi, I have a list box on a form that has peoples names in it. What I would like to do is double click a name then open another form that shows that name in a textbox. I know it can be done, but I'm unsure of the code for it. Thank you!

View 1 Replies View Related

Select Problem In A List

Jul 19, 2005

Hi,
I have an access base with the tables (data) and an access base with forms modules etc (program) located on the server, tables are linked.
i have 3 or 4 users for this application.
Here is my problem:
When a user 'A' creates a new record if user 'B' click on the modifiable list the record appears in the list but when he tries to select it, that is the 1st record of the table wich is displayed in the form ?!!, if user 'B' close and re-run the application theres is no problem.
What's wrong ?
I have next & previous records in my form and there is the same problem user 'B' can't reach the record added by user 'A'
I used .requery on each list boxes so my lists are well updated but i can't solve this selection problem (my form is based on the table)
Thanks in advance for help.

View 2 Replies View Related

Multi-Select List Box

Jun 10, 2005

Hi,
This is my first posting on this forum, and I would greatly appreciate any help with this issue...

I have a form that is used for entering information into tables. I would like to be able to select multiple options from a list on a form and have it saved into a table. Any ideas? Is this even possible :confused:

Here are some paths I followed:
The table has a List Box field, type Text, that gets values for the list items from another table. On the form, I have changed the Multi-Select property of the List Box to "Extended" so that the user can select multiple items from the list. But when I select items from the List Box, the table is not getting updated with the selected items.

Another way I tried doing this: The table has a List Box field that has no values (I'm not looking up values from another table). On the form, I set the Row Source of the List Box equal to the query that gets the list values from a table. I then set the Multi-Select property to "Extended". When I select multiple items from the List Box, the table doesn't get updated.

FYI: The control source for the list box on the form is pointing to the field in the table.


Thanks,
dbnewbie

View 4 Replies View Related

Multiple Select List Box

Jun 28, 2005

Good Afternoon! I am working on a database that tracks our members' attendance at a large meeting. Every person at the meeting has at least one role to play at the meeting and may have up to four. I have created a "tablePositions" with the fields "PositionID" and "Position" to define the various roles people can play at the meeting. In my "formRegistration" form I created a list box with the multiselect property set to Simple. The list is working fine, it appears in my form, it displays the names of the positions (as opposed to the PositionID), and I can select more than one "Position". However, when I view the "tableRegistration" table, I do not see any of the "Positions" I clicked on. I would like them to display (for example) "Delegate, Committee Chair, Trustee" in the "Position" field.

I have been digging around the forum to see if any other threads matched my problem, but couldn't find exactly the same issue. I know enough about access to be dangerous, but could you please include the code and where to put the code in your reply?

Thank you. I really appreciate websites like yours!
Shelly

View 1 Replies View Related

Using Formula To Select From A List Box

Jan 16, 2006

I have a check box that when selected will highlight another Text box which I then need to put in an amount ($). This amount I want copied into yet another Text box which contains other information I have provided.
I have tried to use the IIf function but I am obviously not succeeding.
In the Text box I have the formula as follows:
IIf([Combo23]=True, "[Text23]")
All this formula results in is '[Text23] because that's what is in the inverted commas. How can I get the actual $ amount to go into the text box.
Thankyou so much for your help.

View 1 Replies View Related

Multi-Select List Box

Jun 6, 2006

Good morning all...

I have two questions regarding a multi-select list box.

First, is there any way to have the list box include multi-line items...or which will scroll beyond the right border of the box?

Second, I have a multi-select list box which is populated with an ID # column and a Description column. The user can select as many items from the list box as needed and, as the list box item is clicked, the ID # is added to a memo field on the form, with each ID # delineated with a coma. Is it possible to separate the memo field back out so that each item is identified individually (for report purposes)?

Thanx so much for your help with this...you guys/gals are simply the best!

Karen

View 1 Replies View Related

Modules & VBA :: List Box Select Value

Jul 21, 2014

I have a listbox with *Like* search function as attached file. However, when the cursor moves to the items in listbox, a specific item can not be selected by Key Press even (Enter key). I do not know what my mistake is .

View 2 Replies View Related

Multi List Select Problem

Sep 29, 2005

I have a dialog box where the users can filter a report by various combo boxes that works well. I'm trying to add a multiselect lis box option for one of the combo boxes and have added code which I've also used before. Together the code is looping through and opening the report without a problem, except it's not filtering by the options selected in the list box. Here's what I've got:

If Left(Me![cboSupplier].Column(0), 1) = "*" Or Right(Me![cboSupplier].Column(0), 1) = "*" Then
where = where & " AND [qssupp] Like " + Me![QSSupp].Column(0)
Else
where = where & " AND [qssupp]=" + Me![cboSupplier].Column(0)
End If

If Left(Me![cboPartNo].Column(0), 1) = "*" Or Right(Me![cboPartNo].Column(0), 1) = "*" Then
where = where & " AND [partID] Like " + Me![PartID].Column(0)
Else
where = where & " AND [PartID]=" + Me![cboPartNo].Column(0)
End If

For Each varItem In cboStatus.ItemsSelected
If strCondition = "" Then
strCondition = "[odstatusid] = " & cboStatus.Column(0, varItem)
Else
strCondition = strCondition & " OR [odstatusid] = " & cboStatus.Column(0, varItem)
End If
Next varItem

Set QD = db.CreateQueryDef("Dynamic_Query", _
"Select * from qryWeeklyOrderStatusRpt " & (" where " + Mid(where, 6) & ";"))
If (DCount("*", "Dynamic_Query") = 0) Then
MsgBox "There are no records to print"
Exit Sub
End If

Can anybody see where I'm going wrong?

View 4 Replies View Related

Is It Possible To Select The Same Item Twice Using A MultiSelect List Box

Jun 29, 2007

I would like to be able to create a recipe (saved in its own table) by pulling items from a multiselect list box (from the raw materials table) but which allows me to add the same ingredient more than once.

I work for a chemical manufacturing company and we need to track the cost of goods by recipe (final product), by linking the ingredients (where the cost of the raws are associated) to the final prodcut. Several of our products need to have chemicals added in the beginning, but then again at the end of the procedure unlike normal kitchen recipes.

(I sure hope I don't have to learn VBA . . . I'm totally new at Access!)

Thanks in advance for your help.

View 3 Replies View Related

Multi Select List Box Formatting

Jan 30, 2006

I am using a Multi Select List Box to display a list of names from a table, in order to select e-mail recipients. The names are in two fields: [Main]![First Name] and [Main]![Surname].

I have done this by using the following code for the rowsource:

SELECT DISTINCTROW Main![e-mail], Main![First Name], Main!Surname FROM Main;

This gives a rather undesired effect, in that shorter first names have a large gap before the surname. In addition, there is a dull separating line between the two columns, thus:

Jane | Smith
Bartholomew | Simpson

My questions:

Is it possible to arrange the names so they appear in one column, with a space between them? (i.e. they would appear as written)
If not, can I get rid of the separating line?

Many thanks in advance if you can help!

View 4 Replies View Related

Forms :: Using Multiple Select List Box?

Jun 24, 2015

Currently I am using a multiple select list box in a form to select the engineer names for a report. I am looking for some enhancement.

Firstly when I do not select any name, there is no records displayed. I need to show all records if I do not select any name in the dropdown list.

I would like to create anther format of report to suit other purpose. Can I add the selection of these two reports apart from the selection of engineer name.

After I complete the selection on the form, I click a command button that has On Click event that consists of following code.

Private Sub Command15_Click()
'Create a string that we can apply to the filter criteria
Dim strWhere As String
strWhere = "" 'Initialize string variable
Dim varSelection As Variant
'Iterate the selections in the listbox

[code]....

View 7 Replies View Related







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