Output Data From A List Box With The Possibility Of Multiple Choices Selected(frmPrint)?
Oct 11, 2009
I am attempting to output data from a list box with the possibility of multiple choices selected(frmPrint) and output the data froma another list box frmMain. The code posted does nothing. I can get this form to output everuthing but multiple items selected by the user. I am a student and I have been working on this problem for a long time with no luck.
Private Sub btnAddBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddBooks.Click
Dim intCount As Integer = 0 ' Counter
Dim mainForm As New frmMain ' Form instance
Dim strInput As String ' Input
[code]....
View 2 Replies
ADVERTISEMENT
Apr 28, 2010
wondering if someone can help me some small issues I am having with building my first project.
1.I have comboboxes that allow users to enter their own choices in and then their choices are displayed into the gridview.
the problem I am having is this is allowing me to duplicate choices. for example:when I run debug to try my boxes, I can type in Johnathan into the combobox as many times as I want to and it adds is to the combobox list..so now I got 10 johnathans in my combo box.and then to make things worse, when I hit the button I made to send choices to display..it causes duplicated choices to show up in the display.What I figure is that it is easier for me to just prevent duplicates in combobox.
2.Lets say on one of 10 comboboxes I got...lets say someone skips the box and doesnt make a choice...my grid will then display the last choice made.. (man o man)for example:John chose in his boxes and is displayed on gridview: Combobox1 (john) Combo2 (5:00 PM) combo3 (waiting)now lets say I come up to the computer and in Combobox1(Dcurvez) Combo2( i skipped and didnt enter a choice) and Combobox3(In Progess)
The display will put Dcurvez....5:00 PM.....In Progress because I didnt make a choice in the time combobox..it put in the last choice (Johns) as 5:00 PM Can someone in very simple terms tell me how to fix this problem?? I am using visual studio 2008 and vb/vb.net as language this is not a webpage, btw. it is for in shop computer just.
View 6 Replies
Dec 14, 2009
I'm new to visual basic and I've put all forths of effort towards this program and I can't get it to work. I know one reason is I don't know how to add my choices to the first two list boxes.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RegistrationFee As Integer
Dim LodgingFee As Integer
Dim Days As Integer
[Code]...
View 27 Replies
Sep 10, 2010
I have visual basic 2008 express. i am learning through videos at LearnVisualStudio.Net and the next step is to add item which is the sql database. i don't have this as one of my choices? am i suppose to have it with express? if not, can i get it somehow and add it to my Add Item list as one of my choices? I have the local and the server database but the video i'm following has an SQL database. Again i am just learning so be easy on me.
View 7 Replies
Jan 25, 2011
Can't seem to find code for radiobutton to hilight multiple choices from listbox, e.g.
If radiobutton1.clicked = true then
listbox1.selecteditems = "apple" "cherry" "pear
if radiobutton2.clicked = true
listbox1selecteditems = "apple" "cherry" etc....
View 3 Replies
Dec 8, 2011
I have a datagridview binded to a list of objects... I have a column named Selected containing a checkbox. When these checkboxes are checked and a button is clicked, I want those particular rows to be removed. I initially set it out to iterate through the grid's rows and RemoveAt(SelectedRowIndex) but of course when it removes an object from the List of objects at the selected row (IE Row 1, 4 and 6), the list indexes change and it fails to work properly when it goes to remove the next row since Row 4 is now row 3 in the list...? What is the best way to do this?
View 4 Replies
Jan 5, 2010
I have a list box which displayed the var_field from the database. when the user select a data from the list box and press delete the data should be delted fromt he l;ist box and the row from the database. Im using the following code. but it shows some error called "Object reference not set to an instance of an object."
Private Sub Deletebutton_Fielddetails_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Deletebutton_Fielddetails.Click
Dim form As New Fielddetails()
[code]....
View 3 Replies
Jun 18, 2009
Basically, I want to get the column data from a selected row in a ListView (non-MultiSelect).how to do it if it's just the first column (lvw.SelectedItems(0).Text) but how do I get the data from the other columns?
View 2 Replies
Jun 14, 2011
[Code]...
I'm making a combobox on a form. I want the combobox to have a list of choices from a table in a db. The two columns are a String and a Date. I want the date column to only show the year. I'm hoping I have the code right as it is above, but I'm not positive I've done the whole date thing right.
View 6 Replies
Apr 1, 2012
I'm new to Visual basic (which will be obvious from my question) and am writing program that does various calculations, then displays the results in a list box. the results, however, are all concatenated, end don't each appear on a new line. I tried adding a carriage return/line feed at the end buit the compiler rejected it.
I can't find any examples of creating a list box, and adding multiple entries (one for each time a loop is performed), nor of how to use columns to make the resulting display cosmetically pleasing.
View 11 Replies
Jan 13, 2010
I am trying to develop a vb program where i am using List to store data. I want to use all datas saved in that list from another class. In Class 1, i am trying to include a method that will return my list. And form class 2, i will call that method and get that list. But code isn't working. [Code]
View 2 Replies
Feb 14, 2010
Here's the situation: I need to navigate to a list of sites and retrieve data from them; I know how to retrieve the data, but I'm unsure of the best way to navigate to each of these sites.
[Code]...
View 7 Replies
Apr 13, 2012
the following is the my code:
Private Sub cboYear_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cboYear.SelectedIndexChanged
'declare variables
Dim intSelectedYear As Integer
[code]....
View 2 Replies
Mar 16, 2011
This program is supposed to allow the user to check items in a checked list box. If the item is checked, it goes into the Completed List Box on the right. The program then adds the unchecked items to the Pending list box on the left. I keep getting placement values (e.g. O,1,2) instead of the strings (e.g. "Key Returned") in the list box results (see photo attached)
Public Class frmCheckOut
Dim i As Integer
Dim cleaning As String = "Cleaning Inspection"
Dim damage As String = "Damage Repaired"
[code].....
View 3 Replies
Jun 7, 2012
I have 12 Boolean values in an array. Each of these values represent a CheckBox in my application. I want my program to output a string, based on each value not selected. Each of these values will have a predetermined string that is different from the CheckBox's caption and will be joined to create a final string. I want to generate all the possible combinations for when there are 1, 2, 3, 4 and so on up to 12 of these options at once. I can better explain my problem through the repetitiveness of the code below.
[Code]...
View 12 Replies
Feb 24, 2011
Is there a possibility to activate sub from another sub?[code]if a is 1 then I want my program to run 'sub 2' and if it's not then it should run 'sub 3'.
View 6 Replies
Oct 23, 2008
I am ask about the possibility of scanning document (by scanner) from within vb.Net with vb6 I used Kodak image controls(imgscan, imgedit) but with vb.net it seems that they are not working properly.
View 3 Replies
Feb 9, 2010
I'm working with VB in VS2010 Beta 2.I'm looking for a possibility to use TreeView upside down.So, the root shouild be at the bottom and the childs are not going down, but they are going up, with the deepest level at the top of the TreeView.
View 4 Replies
Jul 20, 2010
It's there a possibility to search for files with progress? Example: I want to search for a file named "test.txt" and i want a label that will show the current folder that it's scanned.
View 2 Replies
Jun 16, 2010
I am trying to create a deployment project for a solution of many projects and two start-up projects. I understand that there are 2 primary outputs in this case. The solution will not work/make sense if either of the two outputs is not running.
At the moment, I have created a set-up project with the multiple outputs, but then I will have to open the outputs individually for them to work. I am wondering if there is a way to create a desktop icon that targets both outputs simultaenoulsy.
View 2 Replies
Jun 7, 2011
I'm having trouble lining up data from a file with their respectable columns in a list box. I am using print zones to space out data evenly, but when i run the program the output is still messy. So I need lining up columns properly together. As of now, the first 2 list box items line up with each other perfectly, the data i am looping through to add to list box is not lining up correctly. I have changed my zones several times, but still no luck.
A chunk of my code (some) :
Dim fmtstr1 As String = "{0,-5} {1,20} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
Dim fmtstr2 As String = "{0,-5} {1,20} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
Dim fmtstr3 As String = "{0,-5} {1,10} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
[CODE]...
View 2 Replies
Jan 22, 2010
I am trying to make the output appear in a list box that only appears after the button is clicked but cannot figure out how to make the list box invisible until the button is clicked. This is VB 2008 code.
Here is the code I have so far:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
calculatemeals()
[Code]....
View 3 Replies
Feb 16, 2011
I have a list and I need to output each subset of the list for example a b c d e would output to
[Code]...
I believe the correct term is combination no element should be duplicated on the same line I was going to attempt this with a series of loops but im not even sure wehre to start
View 3 Replies
Apr 24, 2009
is there a possibility to modify the Datasource that is used for a mailmerge in Word VBA? e.g in the MailMergeBeforeRecordMerge- event?I need to delete some unnecessary lines before proceeding with the MailMerge.
View 1 Replies
Jul 24, 2010
My app outputs to printer and after much effort (and assistance from this forum) I got the print output formated to an acceptable output, except when certain user choices make for a multi-page document. The document prints one page and then cuts off. We formatted the output using a defined rectangle (the code for which I do not fully understand) to format the page. Can experienced users give me some help on getting a multi page output?
View 1 Replies
Nov 6, 2009
When I made the code in the sub generic and passed in the values the timer needed (hour, min, timername) from a start button it seems not to matter which start button is pressed as the labels output the information for the last button pressed.
View 1 Replies
Mar 16, 2010
Here is my code, I cannot produce the output in the lstresults.Text box
Public Class Expense_Report
Const expenseDivide As Double = 50
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code]....
View 1 Replies
Jun 10, 2011
i am having trouble printing formatted output to a list box. Basically I have two string variables that i use to format the output, but it is not working.
Public Class Form1
Private Sub compute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles compute.Click
'make the output area visible to the user
outPut_gp3.Visible = True
[code]....
View 1 Replies
Sep 29, 2011
I'm extremely unfamiliar with both .NET and VB.NET and can't quite figure out how to do this. Say I have code like this:
<div class="breadcrumb">
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
</div>
It outputs a bunch of <span>s with > as separators, something like this:
[Code]...
View 2 Replies
Oct 24, 2011
i am trying to create a list of list in that i would like to work on multiple accounts at the same time. lets say i have 5 accounts. every account has a seperate name. each account has a few fields. so i though of having a list of bookkeeping (with 5 accounts) and a list of accounts (with expense, income, tax, status, etc as fields). [code] and if the idea of using list of list works how do i loop through both lists.
View 6 Replies