Populating Multi-select Items To A Text Field

Nov 27, 2005

I'm new to access. Hope someone can offer some help!

I have created a simple database to better organise some day-to-day office data management. For instance, I have a form (just) to record event attended by staff. The data would then be output as a brief report on overall office activities. Since it's event-oriented, staff attendance is just one complementary information. I went through most of the post re multi-select. I understand that it may not be a good idea to return values from multi-select list boxes into a text field, as it would be problematic for using data-analysis in the future.

In my case, I just need to have a text box, neatly (and easy for user, too) shows who attended. As suggested in one of the posting, I follow the instruction of http://support.microsoft.com/default.aspx?scid=kb;en-us;210203. But it doesn't seem working. I attach my databsae (sorry, it's very simple, as I want to test whether the multi-select work).

Your help would be greatly appr:confused: :confused: :confused: ciate!

Also, what about if I group option button, will it allow multiple return by the way?

delamerbleu

View Replies


ADVERTISEMENT

Modules & VBA :: Multi-select List Box Items To Pass Into Text Boxes

Oct 16, 2014

I have an access project that I am working on and need to be able to select multiple items from a listbox and have the exact selections appear in a textbox on the same form. I have looked around and have not been able to find any code that works.

I have tried:

Me.user2 = Me.slct_auditor.Column(0, 1)
Me.user3 = Me.slct_auditor.Column(0, 2)
Me.user4 = Me.slct_auditor.Column(0, 3)
Me.user5 = Me.slct_auditor.Column(0, 4)
Me.user6 = Me.slct_auditor.Column(0, 5)
Me.user7 = Me.slct_auditor.Column(0, 6)
Me.user8 = Me.slct_auditor.Column(0, 7)

but when skipping the first item in the listbox it is still passed as into the textbox.

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

Forms :: Using ComboBox To Look-up A Multivalued Field And Select Items In Listbox?

Jul 21, 2014

I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].

The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.

As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.

I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.

The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.

View 1 Replies View Related

Forms :: Multi Select Field Locks Out Users

Dec 17, 2013

I have a form that uses a multi select combo boxes. When more than one person is in the database, if a user is updating any of the multi select combo boxes, it locks out other users from making changes to those fields on different records. Looking for solution so that every user in the database can make changes to those multi select fields on their own specific records?

View 1 Replies View Related

Forms :: Null Field Values In Multi-select Listbox

Jun 15, 2014

I have a multi-select listbox (called PotentialItems) which behaves perfectly unless one of the fields has a null value in it, in which case I get an error 13, "Type mismatch" in the following code. It is valid business-wise for column 9 to be null.

Code:
Dim varItem As Variant
Dim dblTargetPrice As Double
With Me.PotentialItems
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
dblTargetPrice = Nz(.Column(9, varItem), 0) '<----- Error here
End If
Next
End With

View 5 Replies View Related

Queries :: Multi-Select List Box As Filter For Query Field

May 16, 2013

On [Form1] I have a Multi-Select Listbox[List1] which shows Job Numbers [WBS] (The job numbers displaying are a result of a separate query filtered by the Fiscal Year combobox). When I click [CMD1] I want [Query1] results to only be selected [WBS] from the form.What is the best way to code this? I'm a beginner when it comes to VBA.

View 12 Replies View Related

Populating A Text Field From A Combo Box Selection.

Apr 28, 2005

I have a combo where the list is populated with a bit of VB code to create a two field list. When the user selects the item they want from the list it displays the item in the combo box and should populate a text box in the same row with the value from the second column.

This combo is part of an orders subform and the user is selecting a product from the list which displays the product_name and the product_id.

The problem is that the product_id is not filled in and access returns the following error:
Run-time error ‘3101’:
The Microsoft Jet database cannot find a record in the table ‘product_table’ with key matching field(s) product_id.

This is the VB code that populates the list :
[code]
Private Sub comboCatagory_ID_AfterUpdate()
Dim sProd_description As String
sProd_description = "SELECT products_table.product_id, products_table.prod_description " & _
"FROM products_table " & _
"WHERE products_table.prod_catagoryID = " & "'" & Me.comboCatagory_ID.Column(0)
Me.comboProd_description.RowSource = sProd_description
Me.comboProd_description.Requery
End Sub
[end code]

What am I doing wrong?

Thx
Kev.

View 5 Replies View Related

Reports :: Populating Text Box With Field From Query That Is Not Record Source

Aug 3, 2015

I have a report based on a query. I want to populate 6 Text Boxes with Dates from fields in another query. The date fields I want to add will be headings for columns that represent weeks (they change all the time so can�t be hard figures). The two queries are not really related by any common field. I am not able to get this working because the fields I want are not part of the query that is the Record Source for the Report.

Is there any way that I can do this? Can I change the record source of just the text boxes?

View 5 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 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 Values In Multi Select Listbox

Aug 19, 2005

i have a multiselect listbox in my form.
The multiselectlistbox contains the names of different persons from tblUsers.
it's allready possible to write the id's of the names to another table (tblPresent).

But what I can't manage to do is re-select the values in another multiselect listbox. This multiselectlistbox is located on my editform.
I can display the values using a valuelistbox, but i need to see the non-selected items too..

hope someone can help me out

View 1 Replies View Related

Populating Combo Box With Certain Select Queries

Jan 7, 2008

I have a form that has a combo box that contains every query in my database. This worked fine until i started having to create cascading queries to return the data I want. How can i populate my combo box with only certain queries in my database.

This is the code I was using to put all queries into my combobox.

FROM MSysObjects
WHERE MSysObjects.Name NOT LIKE "~*" AND
MSysObjects.Type = 5
ORDER BY MSysObjects.Name;

Upon clicking a button or clickin the query in the list, I want the query to run......So the main question is how to I include certain queries in my combo box but not all of them? I do not know SQL or any programming, so as specific as possible will help immensely. Thank you everybody.

View 1 Replies View Related

Select All Items In A Listbox

Sep 21, 2005

How to code a "Select all" button to a multi select listbox named lbSeleccionePuerto

View 2 Replies View Related

Select All Items Ina Listbox

Oct 11, 2006

Does anyone know if its possible to select all items (that is turn all items black) in a listbox? thanks

View 1 Replies View Related

Table Select Field Shows Up As A Number To Text?

Sep 3, 2015

I have a KidShop table that shows the Diagnosis for the person,there are 5 diagnosis fields because one person could have up to 5 Diagnosis and each field is a lookup from the diagnosis table.in the report they show up as the ID number not and not the text.

I inserted Diagnosis from the Diagnosis Table and a window popped up asking what Diagnosis from the Diagnosis table matched in the KidShop Table and gave the selection of Diagnosis 1 or 3 or 3 or 4 or 5. I could only select one and I selected Diagnosis1 in the KidShop table and that showed Diagnosis as text for the Diagnosis1 field but the other 4 diagnosis fields still show a number. I understand what that did but it does not give me the option to match Diagnosis 2,3,4,5 to diagnosis Table. If I changed the Data source for the other 4 to Diagnosis then only Diagnosis1 shows up it the other 4 fields which makes since.

View 2 Replies View Related

Multi Select Box's

Jan 2, 2006

I am looking to see if anyone can help i have been able to get the multi select function part of my form working but i need another filter in the query for a date but it keeps deleting this part of the query everytime i run the report what i need to be able to do is get all jobs against a specific leadcraft that are in the past and also 31 days into the future.

Paul

here is the sql so far, thanks to those who helped already.

Private Sub preview_Click()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim varItem As Variant
Dim strCriteria As String
Dim strSQL As String
Set db = CurrentDb()
Set qdf = db.QueryDefs("FAelecplan")
If Me!Leadcraftlist.ItemsSelected.Count > 0 Then
For Each varItem In Me!Leadcraftlist.ItemsSelected
strCriteria = strCriteria & "MAXIMO_V_WORKORDERS_FA.LEADCRAFT = " & Chr(34) _
& Me!Leadcraftlist.ItemData(varItem) & Chr(34) & "OR "
Next varItem
strCriteria = Left(strCriteria, Len(strCriteria) - 3)
Else
strCriteria = "MAXIMO_V_WORKORDERS_FA.LEADCRAFT Like '*'"
End If
strSQL = "SELECT * FROM MAXIMO_V_WORKORDERS_FA " & _
"WHERE " & strCriteria & ";"
qdf.SQL = strSQL
Dim stDocName As String
stDocName = "elecplan"
DoCmd.OpenReport stDocName, acPreview
On Error GoTo Err_preview_Click
Exit_preview_Click:
Exit Sub

Err_preview_Click:
MsgBox Err.Description
Resume Exit_preview_Click
End Sub

View 2 Replies View Related

Query For Populating A Form Based On Different Select Criteria

Feb 20, 2006

Hi all,
I have a query which populates a form called EditPatientFrm, which asks the user to enter the patient UniqueID in order to pull up the record they want to edit from the TblPatient. However, I want the user to now be able to input just one of three criteria in order to pull up the record to be edited:

UniqueID
ChartNumber
PatientLastName and PatientFirstName (two fields)

since they may not have the UniqueID readily available to them.

Can anyone show me how to do this? I have tried to find answer to this one under queries and forms- no avail. Sure it's a simple thing...

thanks!
vrpres

View 1 Replies View Related

Select Multiple Items From Dropdown List

Mar 24, 2006

Hi,

I would like to be able to select multiple items from a dropdown list like we often see on web forms. The kind where you hold down the control key to select up to 5 items. Is this possible on an access form? If so, how would do we implement, and how is such data be stored?

Thanks!
~Bruce

View 12 Replies View Related

Forms :: Cannot Select Any Of Items In Form View

Jul 7, 2013

I have created a form with a 2 column list box. This is populated using vba but when I open the form in form view I cannot seem to select any of the items.

View 5 Replies View Related

IIf Statement Multi Select

Jul 13, 2005

I have multiple codes assigned to records in a table. I want to be able to say IIf [code] = "FMIX",[qty]*2.2046/7.1, IIf [code] = "Liqd", [qty]*2.2046 and everything else can just equal [qty]. I have tried this statment Expr1: IIf([family-code]="FMIX",[SumOfqty-on-hand]*2.2046 IIf([family-code]="LIQD",<[SumOfqty-on-hand]*2.2046>,[SumOfqty-on-hand]),[SumOfqty-on-hand]) and it doesn't work. Can anyone tell me what is wrong?

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

Multi-Select Form

Nov 30, 2005

I would like to create a form that my users can select multiple check boxes from and have only those records that meet the criteria come up in a search.

See attachment for a look at the form.

I need to be able to let the user have the ability to put in a name and then select any of the check boxes and then click on a search button that will execute a query that will bring up the results.

Any help with code or at least a point in the right direction would be nice.

Thanks,
Chuck

View 1 Replies View Related

Multi-Select Combo Box

Dec 12, 2005

Is there any way to have a Multi-Select Combo Box fill a single field in a table? I've been messing with this for some time now and just can't seem to figure it out.

Thanx in advance
Karen

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

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







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