Listbox Help (remove selected item)

This should be easy but I can not get it to work.

I have a simple listbox with Row Source Type property of value/list.  It is 
not mult select.  I am using .additem to load the listbox and am not using 
the itemdata property.  I want to be able to select an item in the listbox, 
click a button on the form to get the value in column 1 of the selected item, 
then remove the selected item from the list box.

Thanks in advance for any help
0
Utf
2/10/2010 3:27:01 AM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
1614 Views

Similar Articles

[PageSpeed] 6

"sk" <sk@discussions.microsoft.com> wrote in message 
news:1BB03B01-F56E-4CDE-83DF-BF6550AD8593@microsoft.com...
> This should be easy but I can not get it to work.
>
> I have a simple listbox with Row Source Type property of value/list.  It 
> is
> not mult select.  I am using .additem to load the listbox and am not using
> the itemdata property.  I want to be able to select an item in the 
> listbox,
> click a button on the form to get the value in column 1 of the selected 
> item,
> then remove the selected item from the list box.
>
> Thanks in advance for any help

Declare a variable (MyVariable) of the correct type to receive a value from 
the first column, then in your button's click event:

With Me.ListboxName
    MyVariable = .Column(0)
    .RemoveItem .ListIndex
End With



0
Stuart
2/10/2010 4:25:28 AM
Reply:

Similar Artilces:

Advanced Search cannot handle more then 13 filter items?
Hi Everybody, Did somebody of you notice this as well? When using the advanced search, you cannot search for more then 13 filter items. This does not mean 14 different attribute items, but also when searching for attributes of an picklist value. An example: I would like to get an overview of accounts which do match these criteria: - Accountname begins with 'ab' - Owner equals one of these: - ronald - mitch - ..... 10 other names This is still possible. But when I do enter one more name, I do get a Javascript error (translated from Dutch): Line: 103 Character: 4 Messa...

Help question answer please up grading from 2000-2003
I am updating from office outlook 2000 to 2003. I am not comp. savy but trying to do a safe update and need some advice. I backed up all office files, contacts e-mails etc to a PST. When I installed 2003 disk it asked me to remove 2000 first. So I asume the procedure I would do is to add/remove 2000 install 2003 and import back the PST. sounds easy I thought since this was a update that it did everything Automactily Should my 2000 PST back up restore to the 2003 office when installed ? If I remove 2000 I have no disks to reinstall if things should go south thats why I am ...

Remove active directory
Hello everyone!! I want to remove Active Directory from my exchange 2003 server. Is it supported? will I lose functionality in Exchange? Thank you, Cristina what exactly do you mean? you cannot run Exchange 2003 without active directory...what is it you wish to remove? "Cristina Boero S." <CristinaBoeroS@discussions.microsoft.com> wrote in message news:B4FF2A45-F114-4C35-9768-47B078B6AC85@microsoft.com... > Hello everyone!! > > I want to remove Active Directory from my exchange 2003 server. Is it > supported? will I lose functionality in Exchange? > > T...

Pivot Chart/Report Help
I need some serious help here. I've been trying to figure this one out for 3 days now and I'm getting nowhere. I've searched google extensively for anyone else that might have been having this issue but come up with nothing. OK, I have a very simple pie chart created in Access 2003. It is basically just a form in which the default view is set to "Pivot Chart." If I view this on the screen, it looks fine. If I print out the form, the chart is upside down and backwards. If I print out the report in which the form is a sub-report, the chart is upside down and backward...

Help in displaying in a cell
I had type in a number of words (< 400 word count based of microsoft works) in a excel spreadsheet, but the cell only display ############ wrap text option is checked, What's the exact problem? Using excel 2007 Is the cell formatted as Text? Apply a General format to it instead. Also, you can insert manual line breaks as you enter the text using Alt-Enter. Hope this helps. Pete On Jul 3, 9:59=A0am, "crapit" <biggerc...@yahoo.com> wrote: > I had type in a number of words (< 400 word count based of microsoft works= ) > in a excel spreadsheet, but the c...

Please help me with my Excel
I have got a new lap top and I have a good antivirus and spyware. my pc works good but once I open Excel my CPU jumps up to %100 and the strange thing is that when I click on other programs my CPU comes back to %4. The more strange thing is that when for example I press F2 to edit a cell , CPU works good but when I press Enter, again it goes back to %100. Here our IT man reinstalled my MS-Office and he did some other exotic operations but there was not any slightest change and the problem is still existing and going on my nerve. Please scientists help me ! I work with Excel 7 hrs per day ...

Subquery help PLEASE! :P
Hi all. I'm about to throw in the towel on this subquery. I've checked it and rechecked it. OK, as an overview, I have two tables, one of names of industries (automotive, energy, etc) named tblIndustries. I have another table of stock market company symbols, called tblSymbolsMain. This table has an industry type as a field for each stock symbol. I've written a function (that works great) called MultiDayPerfClose that returns a performance in terms of percentage of a stock. What I'd like to do is get an average of performance returns for each industry. I'm usin...

Help: Transferring sent items to IMAP 'sent' folder
Hi, Someone somewhere must know an easy fix for this. The University in which I work is looking to change it's default e-mail program for staff from OE6 to either Outlook XP or 2003. The problem we're trying to find a solution to is the transferral of sent messages to an IMAP 'sent' folder. There is a Microsoft KB article ( 198852) that instructs how to set up a rule using the 'Rule Wizard' which will perform the task. The article says it only applies to OL '98 but we've tested it and it works for OL XP. What we need to know now is how to automate the appli...

Open form based on selection
I have a form [frm_modelselect] where I will select a chair model. Then I want to hit a command, or just have a macro that runs onChange. Either way, I want to open a specific form based on the Model that I selected in [frm_modelselect]. How do I go about doing this? Thanks in advance. Travis On Mon, 30 Apr 2007 14:24:04 -0700, Tdahlman wrote: > I have a form [frm_modelselect] where I will select a chair model. Then I > want to hit a command, or just have a macro that runs onChange. > Either way, I want to open a specific form based on the Model that I > selected in [frm_...

GP BOM should be able to select variable BOM from date or range
I had a request from prospect to see if GP could allow their Mfg Mgrs to create a cutoff or date range from which to select different BOMs. For example: They wish to change ingredients used in a dietary supplement starting Tuesday. Work orders from Tues onward would use an alternate BOM. All work orders prior to Tuesday would used the original BOM. There are other similar scenarios. Thanks ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the...

HELP PLEASE #6
i HAVE JUST SET UP OUTLOOK... I got a memo today, a pop up that said that Outlook can get rid of your spam.I thought it was from Microsoft. Now I have another tool bar on my internet and I hate it. Worse than that, I keep getting pop ups. How do I remove it.It is called SpamBlockerUtility. Relamb111@aol.com thanks look for spamblockerutilityblockerutility "rhory" <anonymous@discussions.microsoft.com> wrote in message news:4a0d01c47396$e1bdd6a0$a301280a@phx.gbl... > i HAVE JUST SET UP OUTLOOK... I got a memo today, a pop > up that said that Outlook can get rid o...

Unable to open html attachment in outlook 2000 (Please help)
Currently using outlook 2000. Got an attachment html link. Click open, a new windows --> system32 opened. Click onto the attachment again, Click save as, into my computer, double click the link, then it able to open in IE. Q: Why can't I open it directly, instead I have to save the attachment before open the html file. Please help. Thanks & Regards James something is messed up if it's opening a windows explorer window. I think you'll need to reregister IE. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for ...

How do I remove the (blank) from an excel pivot table?
I am trying to create a pivot table from a liston an excel spreadsheet. Many of the items on the list will be blank. On the pivot table, the blank items show up as (blank) - I want the cell to be empty! I tried setting the table empty values but that doesn't work...any help would be greatly apprecated... If you click the small black triangle near the top of the Table, a menu will appear. Just clear the checkbox next to (blank) -- Gary''s Student "MarkfromAZ" wrote: > I am trying to create a pivot table from a liston an excel spreadsheet. Many > of the...

Remove the word 'total' from subtotals
Hi I am doing a subtotal using hte sum function After excel subtotals it inserts the word 'total' in the same line as the field being subtotal How can I remove total? I need to take the subtotaled info and upload it into another program and it will not work with the word totoal there Thanks Have you tried F2 and edit the cell contents to remove what you don't want? Gord Dibben Excel MVP On Sat, 12 Feb 2005 19:40:02 -0500, yahoo <nj530@yahoo.com> wrote: >Hi > >I am doing a subtotal using hte sum function > >After excel subtotals it inserts the word '...

changing columns in the select names dialog box
Outlook 2003 using Microsoft Exchange Server. 1) Is it possible to change which columns display and in what order in the "select columns" dialog box? 2) I have found that I can remove a column by dragging and sliding a column to the left against the next column on the left. Unfortunately I have removed some columns that I would like to see. How do I get the columns to appear again? Many thanks. Jeff 1) No.=20 2) That's a tricky one! It took a couple of minutes for me to figure = out. Position your mouse pointer exactly over the divider on the left = side of the colu...

Listbox Control Performance issues
Hi, I am not sure this is the right group to post this question, but I think you will be able to point me in the right direction in any case. I have a pop-up form that apears to help users select records with different simple criteria. The criteria is very similar to what you would find in a custom filter in Excel (equals, does not equal, begins with, contains, etc). The matching records are added to a Listbox. BTW, I have Office 2k3 Pro running on WinXP Pro SP2. The problem I have is that in some cases, that I find hard to replicate, the performace of the Listbox adding or deleting r...

Unable to display folder error message--HELP
Since having Windows XP reinstalled last week, I have a new problem with Outlook 2002. I've used Outlook for several months for contacts and calendar, which I hotsync with a Palm. I do not use Outlook for email, as I use Netscape. I am not on a network. This is the problem. Both the Calendar and Contacts work fine for awhile and then I get the following message when I either click on Calendar or Contacts: C:\Documents & Settings\username\Local Setting\Application Data\Microsoft\Outlook\Outlook.pst is already in use by the maximum number of applications. Close some of these app...

using a popup to make percenatges on selected cells
Hi I'm hoping someone can help with some code. I'm selecting a group of cells containing numbers. I want via a popup to change the selected numbers to the percentage entered in the popup. For example - I select my cells and run the macro. The popup asks for a number and I enter '50'. All the selected numbers then change to 50 percent of their previous value. It would apply equally to a selected whole column of numbers. Grateful for any help. Best Wishes hi Sub changenumber() Dim n As Double n = InputBox("enter a number") n = n / 100 ...

Thumbnails: Entourage and MS Word help screens
I use OS 10.3 and Office 2004 for Mac 11.2.1 (recently downloaded the upgrade). For several weeks, Entourage messages and Microsoft Word help screens have been previewing and printing only as thumbnails. I know that Preview tends to reduce the size of documents so they will show in the small viewing window, but on my machine Entourage messages and Microsoft Word help screens preview in microscopic text--and print that way, too. The text is about 2 pts. This happens when I use any of the three printers in our office. I've noticed that while the preview PDFs are up on screen the "actu...

VLookup problem...help pls...urgent
Hi, I have wriiten the following code. Private Sub btnPastCommentsActivityList1_Click() Dim dt As Date dt = txtOldDateOfEntryMonth1.Value + "-" + txtOldDateOfEntryDay1.Valu + "-" + txtOldDateOfEntryYear1.Value 'dt = Format(dt, "dd/mm/yyyy") MsgBox dt ActiveWorkbook.Sheets("Activity_Database").Activate Range("B6").Select txtOldComments.Value Application.VLookup(cmbInitiativeDescription.Value, Range("C6:Z9999") 18, False) And Application.VLookup(dt, Range("B6:Z9999"), 18, False) End Sub I have got three columns. On...

Need help on mail merge with 4 up postcards Avery 3380
I just upgraded from Office 2000/Win XP to Office 2007/Win Vista 64 Ultimate. I had previously created postcards using Publisher and a mailing list (datsource) using Word and everything was fine in Publisher 2000. The Avery postcard stock is titled 3380 (or use template 8387) and is 4 up using landscape print. I have a deskjet 6840 that I can manually duplex on. When I try to do this on Publisher 2007, I select File-Print Merge and Multiple pages per sheet. It seems to know it's 4 up, that is on one side of the paper there are 4 printable areas, but it prints on one side: <front>...

Help: AfxGetApp()->OpenDocumentFile crashes in release mode
Help!! The line AfxGetApp()->OpenDocumentFile(...) works fine on my computer (where I compiled the application using VC 2003 .NET), but crashes on different computer that doesn't have the VC installed. I copied 3 dll's to other computer system32 dir: MFC71.dll Msvcr71.dll mfc71enu.dll The debug version works fine on both computers, but I had to copy 2 more dlls (ending with d) to other computer. I also tried linking MFC statically, but it still crashes... What am I missing here? Any help is greatly appreciated ! I just narrowed it down a little. It turns out that doc is get...

Report Help
Hi All, I am running a report linked to a query in which the criteria is pick up from a form using dates (using the "between" statement) In my report PAGE HEADER i have the following code in two text boxes so the I can show the "To" and "From" dates =[Forms]![weekly summary date select].[startdate] =[Forms]![weekly summary date select].[enddate] When I run the report it has several pages but the two dates only appear on the first page, on the consecutive pages the #Name? is dispalyed in the two text boxes, how do I get these additional pages to d...

error message when accessing "Item Stock Inquiry" screen
Hi - I get the error message "A get/change operation on table 'tcsSYSTB00000_WindowParams cannot find the table." when i open the item stock inquiry screen; you click OK, and no data shows on the screen. How can this be fixed? Thank you - This looks like You have a customization done on the Stock Inquiry Screen and somehow when You are trying to access the data, it is not able to call the table you are referring to. Go to SQL Management studio and query the table. Thanks Janakiram M.P. MCP-GP On May 5, 12:14=A0am, Oumar <Ou...@discussions.microsoft.com> wrote: > H...

Outlook Sent Items Email
We have an end-user that on one particular day was sending out email both new emails and reply emails and the emails show that the "from" address is labeled as "unknown" and the emails were never delivered to recipients. What could possibly cause this? We are currently using Google Apps mail client with the google apps sync plug-in for outlook. Any comments and/or suggestions are kindly welcome. ...