Remove Names From List Box Upon Selection

May 6, 2005

I have a list box that is filled from a table with names of individuals. What I would like to do is when one of the names is selected it will take it off the list and do this for all the names in the list until all are removed then will reset and have the names avaialble once again. Is this possible and if so how can it be done? Thanks.

View Replies


ADVERTISEMENT

Remove Selection From List Box

Nov 18, 2004

I have an unbound list box that gets its data from a query. I have a button that grabs the selected item(s) from the list box and puts them in a text box. The code for the button is:
Dim nsrow
Dim mystring
Me.List40.SetFocus
If Me.List40.ItemsSelected.Count > 0 Then
For Each nsrow In Me.List40.ItemsSelected
mystring = mystring & Me.List40.Column(2, nsrow) & ", "
Next nsrow
End If
If Right(mystring, 2) = ", " Then
mystring = Left(mystring, Len(mystring) - 2)
Else
End If
DESC = mystring

How do I make it so that when the item is selected and is in the text box, it prevents the user from clicking that same item again from the list box? The best way I think is to remove the item from the List box once it's in the text box but I don't know the code to do it.

Please Help!

View 6 Replies View Related

Forms :: Nomination Form - Combobox Selection List Not Updating After Each Selection

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

General :: Code To Remove Spaces From Table Names

Jan 27, 2015

We use a Database which has been constantly developed over 10 years using earlier versions of Access2003.We have Upgraded to Access 2013 and we are experiencing many conversion issues which I need to resolve.One key problem is that many of the earlier tables were developed with spaces in their names (Hindsight is a wonderful thing?). There are over 200 Tables that need changing. I would like to update the Table names replacing every "space" with an underscore"_". AT the same time I would also need to Update all of the QUERIES that use these particular Tables to be updated to reflect these changes made and still work as normal. I can do this manually but it will be very time consuming and perhaps someone has already had to do this when recently upgrading to Access 2013?

View 9 Replies View Related

Forms :: List Box - Selection - Populates Next List Box

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

Field Names In List Box

Jun 16, 2006

I would like to have a listbox that contains all of the fields names from a table. Since the user will be selecting items from this list box, the field names should be referred to by their captions as defined in the table.

The listbox values will change depending on the value selected from another listbox.

Question: using code, how can I fill a list box with field names and display the field caption?

Thanks!
Lisa

View 1 Replies View Related

Add/Remove Records From A List

Jun 2, 2006

(Been a while since I had a question.) I have a table that stores a list of paper forms. the fields are ID#, display name, doccument name, and a code to determine if its a Word or Excel doccument, or an access report. Works fine; the user can click a form name (on the Forms/Reports tab on the main menu form) in a list box, set the # of copies and print the form. There are cases when a group of forms is needed (client admission is one). I have made a group table containing: GrpID, Grp Name, formID. I would like my "Form Group Edit" form to have 2 list boxes; the left one containing the (short) list of available forms; the right one displaying what forms are already (if any) in the selected form group. My idea is to have add/remove controls to manage the right list. I know this "wheel" is already invented and would like to plagerize one that works. Thanks in advance for your help.

View 2 Replies View Related

Print A List Of Table Field Names

Dec 20, 2005

Just a quickie- i hope. :rolleyes:

I am in the process of trying to merge two large databases. I have four tables that really should be one to work in the new DB. I just need to be able to print a list of fields in each table so that I can work on the new combined structure before making the changes. I know I can use the documenter but this produces a very comprehensive list which is much more than I need.
Is there anyway of producing a similar list without the detail, just showing the field names.

Thanks

View 14 Replies View Related

Combo Box List: Repeated Names Problem

Dec 11, 2004

my search form has a combo box with "make"names. i can add new makes via a other form. so the combo box needs te run via a query so that it can list new makes (so that i can also search them). but, since some makes repeat them selves in the table, sometimes up to 15 times (see atachment 1), the combo box will show 15 times the same make. i just need it to show the make 1 time, all of the makes just 1 time. only way i can do that is to type them my self (see atachment 2). but then new makes that are added later wont be shown in the list.

so: i want that the make is only shown once in the list, and that the list is updated with new makes that are added later. how do i do that?

note: a "make" E.G = Philips, Apple, LG, Microsoft, creative etc (just for the lesser skilled english readers like me )

all help is welcome

View 2 Replies View Related

Forms :: Selecting Few Names From A Long List

Mar 22, 2013

I am currently designing an employee personal development and training database.I have 100 employees and the number that would go on a training course might be a handful so selecting four or five names in a subform list from a 100 seems a bit impractical.

I thought of selecting the course in a form from a combo box, selecting the employees using a tickbox in a subform and then running an append query.

View 6 Replies View Related

Modules & VBA :: Populate List Box With Table Names

Jul 10, 2014

I am trying to populate a ListBox with the names of the tables from another database. I have the following function which loops the table names from the database I want. The function is caleld on Form Load and passed into the ListBox but the List Box is empty.The message box in the function does display the table names when called from the form. I just cannot get the list box to populate.

Code:

Public Function ListTables()
Dim db As Database
Dim i As Integer
Dim s As String
Dim tdefs As TableDefs, tdef As TableDef
Set db = DBEngine.OpenDatabase("C:MyPathAnalyzed Tables.mdb")

[code]...

View 5 Replies View Related

Forms :: Remove List Item From Combo Box After Use

Sep 1, 2013

Is it possible to remove an list item from a combo box list after it has been used.

What I am trying to do is use a combo box that has a list of questions, after the user selects a question from the combo box list and answers the question when they reselect the combo box that question will not be seen again till the form is reloaded.

View 2 Replies View Related

How To List All The Column Names For A Given Table Using A Single Query?

Dec 16, 2005

:mad: :mad:
Hi folks,

I wonder how can I list all the column names for a given table using a single query? I know how to do it in SQL using system tables, but no idea how to do that in Access.

Thanks.

View 1 Replies View Related

General :: Pulling Certain Names From A Query To Populate A List Box?

Jun 19, 2015

I have a form set up (in a list box) to show our salespeople what parts they have yet to get out of inventory but have a sales order for. The list box shows a list of all the salespeoples names. My manager wants me to show ONLY the salespeople that have populated fields in this list box. The list box currently shows all the salespeople, but I want to see only the ones that have inventory that has yet to shipped. How do I go about this?

View 4 Replies View Related

General :: Remove Customer From List But Keep All Related Info

Sep 26, 2012

Let's say I have a list of customers. For each customer I have much more info on other lists (order list, personal info list, bank info list, and so on) - all are of course connected properly.

Now let's say a certain customer is no longer my customer, so I want to remove him from the customer-list. But, I want to move him to a different list - past-customers - so all the information that was related to that customer will remain so. In short, I want to remove from the customer-list without affecting the related data.

View 4 Replies View Related

Forms :: Multiple Instances Where Inactive Names Should Not Show On List

Mar 22, 2013

We have a form that will have one combo box for Associates (like Employee in the OPs DB) which I've got set to show only active Associates for new entry per the tips in the above thread, but we'll also have a combo box for Developer which I need to function the same way. I don't know how to add that part to the On Current event?

Code:
Private Sub Form_Current()
Dim strComboRowSource As String
If Me.NewRecord Then
strComboRowSource = "SELECT T_Associates.AssociateID, T_Associates.Associate, T_Associates.Active " & _
"FROM T_Associates " & _
"WHERE (((T_Associates.Active)=True));"

[Code] .....

View 4 Replies View Related

Multivalue List In Table - Displaying Names Separated By Comma

Sep 30, 2011

I created a multivalue list in my table. It contains a list of names and a checkbox. I designed the form based on this and am able to check off multiple names. When I go back to look at the table, it stores in each name separated by a comma. So far so good.

When I create a report to display the data, it displays it as 1,2,3..etc., instead of the names separated by a comma.

What do I need to do to display the names ?

View 5 Replies View Related

Assign Employees To Task Then Remove Employee From List Of Available For Other Tasks

May 6, 2015

I need the ability to assign employees to a different task in each of four different timeslots on a daily basis. What I would like to do is as I assign an employee to a task in timeframe 1, I would like for them to become unavailable to assign to another task in the same timeframe.

For Example: Three employees to assign to three tasks at the 8 AM to 10 AM time slot.

Employee
Task
Time
Assigned

Emp 1, Emp 2, Emp 3
Task 1
8 AM to 10 AM
Emp 2-Task 1

Emp 1, Emp 3
Task 2
8 AM to 10 AM
Emp 3-Task 2

Emp1
Task 3
8 AM to 10 AM
Emp1-Task 3

It would be nice to set this up in a form where my person doing the scheduling can assign an individual to a task and that individual name disappears from the combo boxes, list boxes, or is "greyed-out" in a listing of employees available for the time period for the remaining assignments.

View 7 Replies View Related

Need Help With List Box Selection

Feb 22, 2005

I am new to Access(and self taught) so bear this in mind when you view my DB. (Any suggestions are appreciated)I am using Access 2003.

I have included a sample DB. What I need this to do is when you use the Fill Selection Form You can choose mulitple selection in the list box. When you click Done those you selected will show up in the right hand side subform where you can add quantities. I want this info to be stored as one "Fill". It would also be nice if while you are selecting in the list box a calculated field shows you the total weight you have chosen.

Can anyone help???? :confused:

View 1 Replies View Related

List Box Selection

Dec 15, 2005

Hi There

i have a list box on a form, which from a query provides four columns

the first column is the bound column and is the reference ID,
the second column is the reference
the third column is the reference type ID
the fourth column is the reference type

depending on the reference type, the reference is edited on a different form

how do i / can i code it that when i double click the list box, the correct form opens to edit the reference details with the reference ID as the linkcriteria,

i am okay with the linkcriteria, but not with the code for the correct form to open

thanks in advance

View 3 Replies View Related

Forms :: Drop Down List Linked To Table - Names Not Appearing Alphabetically

Sep 14, 2014

I have drop down list linked to table included "agent names" , the names appeared normally in the form but not Alphabetic (A-Z) although the table was alphabetic .

View 1 Replies View Related

Msg Box Based On List Box Selection

Jun 20, 2005

I have a form that contains a list box with 11 separate options. Within this list is the option named "None". My desire is to have a message box displayed when any option is selected other than "None". I have searched various threads, however I have been unsucessful nailing down my issue. Thanks in advance for the assistance.

View 1 Replies View Related

List Box Text Selection

Feb 7, 2006

A few weeks ago I had a post in which I asked how a user could type in the text value of a list of selections in a list box, and arrive to that selection.

Such as if they type in "A" then "B", it goes to "Abby" rather than "Aaron" then "Ben". It was answered that this was not possible in MS Access with a list box, so after that I basically told the users I would look into it more.

I have finally cleared off my desk and arrived back to this small issue.

I thought of the idea to add a Drop-Down Combo Box to the form. I could use the functionality built into the Drop-Down Box to allow them to type in the person they are looking for in the List. Then click a button labeled "Find" and it would take them to the correct person in the list box. They could then function as before.

I just could not figure out the code to put behind my "Find" button. I am not sure if you can do a "Goto record" against a List Box, or a "Find record" against a list box.

Has anyone run into this issue, and if so, was there a way to work around it?

Thank you,

T.J.

View 2 Replies View Related

Default Selection In List Box

Jul 17, 2006

So I have a list box on a form from which users can select which fields to display in a query... There is a default set of fields to display, which at the moment is hardcoded in the associated VBA (far from ideal). I was wandering if there is a specific way to open a list box with a number of values selected by default?

Many thanks in advance,
Bogzla

View 1 Replies View Related

Choosing A Selection From List Box

Dec 14, 2004

I have a list box that pulls data from a form. It pulls ProjectID and ProjectName. I want to be able to select one of the ProjectName(s) from the list and have it take me to a form for that ProjectName. I have one form for all the ProjectName(s), and want to be able to simple select one of the ProjectName(s) from the list and have access bring me to the right page of the form. Please Help! Thanks!

View 4 Replies View Related

Retrieve The Selection Value From A List Box

Jan 14, 2005

how can I retreive the value (and not the index order with listIndex) from a list box? I have a list-box based on a parameter query and I want to retreive only the selected record (in the list box) data from that query.

View 2 Replies View Related







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