VS 2010 - Transferring Data From One ListBox To Another
Mar 7, 2011
I want to transfer my data from one list box to an other and save the data and display it at the same time with the TIME, Name, and the Quantity. For example, if I have a movie ticket, and says I bought one ticket thats 10 dollars. If I did type all the calculations with tax it should be 10.10 for the 10% tax. This will show on first of my list box. Secondly if I press something like Enter, it will show that 10.10 number and also put it in the other lstbox. I have 3 list box. One to show the current transaction, one to show the history of them and the total amount of all transaction.
View 8 Replies
ADVERTISEMENT
Aug 3, 2009
My assignment involves wrinting an airline reservation brogram where the user can hit a make reservation button and the user can then input passenger name departure city and arrival city, all of this has to print to a multiline textbox, the professor also wants a find reservation button and a cancel reservation button.
Public Class Form1
Sub get_data()
Dim passengername As String = InputBox("please enter passsenger name")
Dim departure As String = InputBox("please enter departure city")
[code].....
View 5 Replies
Jun 7, 2011
I have a listview and Contextmenustrip control. Listview contains one coloumb. How to transfer ListView data to ContextMenuStrip?
View 2 Replies
Oct 13, 2009
I have a listbox populated with items which are the numbers 0-10. I need to know how to make the app transfer the selected items into 3 separate text boxes. First it should total the the cumulative values of the selected numbers & place that value into the 1st box. Then is should list the total number of items selected from the listbox & place that number into the 2nd box. And finally it should give me an average of the selected items, now this part I've got down, as I can input the first 2 numbers manually into the boxes & will get a correct response in the 3rd text box.
Here's what I have thus far on my code,
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'fills list box with values
For dblRates As Double = 0 To 10 Step 1
lstScores.Items.Add(dblRates.ToString)
[Code] .....
View 2 Replies
Jan 7, 2010
I have the following code in place: Protected Sub btnBuy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuy.Click Session("ShoppingList").add(New OrderInfo(txtQuantity.Text)) Server.Transfer("ShoppingCart.aspx") End Sub
View 5 Replies
Jun 12, 2011
The title of this thread perhaps does not explain my problem correctly.Actually i am developing a financial software for a company.The software is similar to a banking system. The software is being developed using VB 2008 and SQL Server 2008.The company has its branches located at different locations. They are having a centralized SQL Server at their Head Office.The branches are connected to Head Office using a VPN.Now what we are worried about is when the VPN gets disconnected.For that we will be having a SQL server installed at each of the branches.When VPN is connected the the details entered will be directly at the Head Office database,Meanwhile a program will be executed which will get details from the Head Office database at each of the branches in a XML file.When a branch gets disconnected from the VPN another program will get the XML details into the Sql Server installed at the branch. When the branch is connected again Another application will create a xml file from the local server and insert its details into the HO server.The sizes of the XML are reaching upto around 150 to 200 mb. I am using Dataset.WriteXML and Dataset.ReadXMl. I have tested this on my local machine it is taking upto 30-40 secs.I dont know how much it will take when the actual application is installed. How can i speed things up ? Does anyone have any idea on how i can do the whole process more smoothly and faster?
View 5 Replies
Jan 3, 2006
I wanted to write a small piece of vb code to synchronize a few FoxPro dbf tables to SQL tables that having the same structure or at least a few fields that i selected. I had tried a code which I found on the net that running row by row and column by column to update the SQL tables but this code is too slow. In my dbf table it contains around 3000 records at least.
View 12 Replies
Jun 17, 2011
i want 2 copy some part of one table into another but getting error @ this line
sqlCmd = New SqlCommand("insert into name_table(name) values ('" & ds.Tables(0).Rows(1).Item(0) & "'", sqlCnn)
View 4 Replies
Jun 12, 2011
I'm doing a project that requires me to create a book ordering form. I have the books displayed in a listbox named bookselectionlistbox, and when a book is selected, it displays the price of that book in a label named bookpricelabel1. I have a button named addbutton that allows the user to add the book to the shopping cart. The shopping cart is in the form of a combobox named shoppingcartcombobox. Lastly, there is a receipt button that transfers ALL the books from the shopping cart to a seperate label called label3, not just the selected book. The last thing I need to do is have the price of each book also transfer to the receipt section. This needs to be done either on the same label3 on the same line as the book title, or on a seperate label that is adjacent to label3, I have temporarily placed a label there named label5. I am using a case statement for the bookselectionlistbox to say that when a certain book is selected, the bookpricelabel1 will display "$xx". I also have an IF statement under the addbutton label that generates a total price for all the books in the shopping cart, here is an example of the code I used for one of the books:
[Dim visualbasic As Decimal]
[If shoppingcartComboBox.Items.Contains("Visual Basic") Then]
[visualbasic = 55]
[Code].....
View 4 Replies
May 18, 2012
I would like everything in listbox1 to transfer to listbox2. I didn't paste my whole project because it is messy and lengthy but I was able to re-create the scenario with this code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code].....
bottom line, I want everything in listbox 1 into list box 2 when combo box = a and button is pushed. when I try to execute, only one or less go into the second list-box and the rest stays there!
View 4 Replies
Jun 6, 2011
I'm developing a project for gathering customer feedback using a Samsung Q1 Ultra, a cheap touchscreen PC. The project consists of two parts: a PC based application that builds the survey and stores the info on an SQL Server, and a survey viewer on the Samsung device which downloads survey data from the SQL Server and stores it on a SQL Server Compact 3.5 database.
My question is, how best can I transfer survey data from the SQL Server to the handheld device's database? Writing a tonne of code to copy data from one database to another seems overcomplicated - is there a handy function or somesuch that I can use to copy data from identical tables on these two separate databases?
View 2 Replies
Jan 17, 2010
How would I go about transfering data within textboxes on 1 page, to the same textboxes, but on another new page.
Basically, I already have coding that caluclates distance time, price per litre of petrol (it's a bus firm company application), and put's it into textboxes within a group box on my page. Basically I just want a bit of coding which will transfer this info, to different texboxes, but on a different new page, the idea is that I can then do fresh coding on that page without it interfering the coding on the current page.
View 2 Replies
May 4, 2011
Visual Basic 2010.I excel in transferring reports on problems in formulas..[code]
View 3 Replies
Dec 28, 2010
I am new to ADO.Net and I mistakenly using the dataset as how we use recordsets in ADO., I know that it is possible to create a Datatable which will only reside in the memory and hold data. What I need to create is like this.
1. Create Datatable.
2. Fill it with sample data at least 3 lines.
3. Transfer the data from datatable to database (access,sqlsrvr etc).
View 2 Replies
May 27, 2009
I have 2 forms in this application. One form is just a simple SQL statement that is generated into a grid. It displays columns/rows. From there I want to be able to click on a row and have the first column of that row transferred to another form. In the second form I want it inputted into a text box. So, the user doesn't have to copy the record back out of the form then open the other form and paste.
The form opening and closing is not the problem. The problem is getting the data to transfer from one form to another!! I am not sure how to do it.. I have only been coding in VB for a few days and no formal training. I am aware of global variables and would be willing to assign the data to a variable and then have it transferred into the textbox of a the second form.
I do not know how global variables work in VB. This is what I got so far............
'The user clicked the transfer button.
Dim obj As System.Data.DataRowView = grid.Current
MsgBox(obj.Item(0), vbInformation, "Selected Data")
[Code] .....
View 2 Replies
Dec 19, 2010
I m working with a appliction in VB.net
I have a three forms .Menu form which i have set IsMdiContainer as true
Through this form I m opening a new form named " Query"
This form has two drop down and one textbox and some other controls
When user selects ths first dropdown (States)second gets filled with City
When use selects a city I wat to open a New form named as parameter.parameter
form has two textbox and user will enter the paramater and click the submit button.
I want the text of these two textboxes in My "Query" forms 's text box and I want the drop down as it is(filled with city and states)
View 3 Replies
Jun 28, 2010
I have written a VBA code in EXCEL that updates my tables in Access. The code is fully functionnal when I am entering new data but I don't know how to make it work when a data (primary key) already exists and that I need this data for another table. I would like to find a code in this format (DAO) :
If value exists in table Then
Return the value.code (not the value but the code related to this value)
else
.addnew
here is what I have tried but does not work:
Code:
Function Find_Last_EngineCode() As Integer
Dim cn_engine As ADODB.Connection, rs_engine As ADODB.Recordset, feuille As Worksheet, plage As Range, last_record As Integer
Set feuille = Application.ThisWorkbook.Worksheets("To_Access")
[code]....
View 1 Replies
Apr 5, 2009
I have a psychology experiment that has users respond to specific text or pictures by pressing either a button for "similar" or a button for "opposite" and then the program records the time from the presentation of the stimuli to the time they press one of the buttons as the latency. I have the information ans some other data successfully exporting to a text document but would like to have just the latency data also go into an excel spreadsheet for easier analysis. Here is the code for one of my buttons that currently writes to the text document:
[Code]...
View 3 Replies
Apr 16, 2009
I'm developing a management program for a driving school, where information about all students is stored and accessed.
The thing is, this school has got two branches, so I need some way for those two computers to share files with each other in order to keep a common database. I would like to use the same program in both computers, to keep simplycity to the maximum.
I know it's using TCP, but I haven't got the lesser clue of how i can achieve that. I've looked around, but I haven't found much of how to acchieve something like that. The files both computers would be sharing are text files.
About the IPs, I'm thinking of using NoIP or one of those to always know both IPs.
View 1 Replies
Aug 23, 2010
I'm developing a program that handles money, and there is a pre-made excel spreadsheet that I am to be transfering data into specific cells. How can I go about telling my program to write specifc data into specific cell numer in excel? Also, how can I get my program to write into specific areas of a MS Word Template (my program will generate letter with the same template just different names/addresses/valus)?
View 1 Replies
Mar 29, 2011
I am adding data to two listboxes: listbox1 and listbox2. Now i want so sort Listbox 1, witch i can do with listbox1.sorted = true. But then listbox 2 has to be sorted the same way. (The data has to be matched) How can i do this?
View 1 Replies
Sep 26, 2011
I have an application that receives data input from an automated set of devices. This data stream I have managed to capture & get it into a list box which I can sort based on the Device ID & the time that the response was received.There is a set time window for the devices to transmit their data into the application and during this each device is not limited to the number of responses it can send (ie :- Device 1 can send in 2 responses where Device 3 can send in 40 responses, etc).All of the responses are captured, listed & sorted within the listbox (this bit is working ).I now need to extract the last (ie:- latest) entry in the listbox for each Device ID & this is where I am stuck. I can retrieve the last item in the list but cant seem to extract the last item for each Device ID.The code that I am using for the Device response capture, etc is :-
*********Code Start
Private Sub btnPoll_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles btnPoll.Click
[code].....
View 2 Replies
Dec 19, 2011
I want to load data from a txt in a combobox and a listbox. The txt is composed as follows:
ID NAME
0001,name1
0002,name2
0020,name3
[Code].....
In the combobox I want to load 'NAME " And in the listbox I want to load "ID"
View 11 Replies
Jan 24, 2012
I have a text file in which there is a list which is composed as follows:
3236, Alberto
5894, Peter
7894: Alonso
and so on ...
What I want is loaded into a listbox the numbers to the first semicolon and load the combobox names.
View 2 Replies
May 4, 2012
I'm studying VB 2010 at uni and struggling with this assignment, I'm stressing now with one week to go before its time to hand it in and still not knowing how to do it (even though i've read the whole textbook!)
I have copied the instructions and the files I have been given.
1 List all of the data from Teams.txt in a Listbox. Include suitable headings.
2 List all of the data from Results.txt in the Listbox (use the same Listbox as in 1 above). Include suitable headings. Note that you cannot assume that the file contains only results for the first 3 weeks of the season. Your program should be able to process a results file with more or fewer results.
3 List all of the data from Results.txt in the Listbox. However, in this case the actual team names should be output (your program will need to get this data from Teams.txt. The data should be formatted so that it is aligned correctly. Include suitable headings.
View 4 Replies
May 16, 2011
Is it possible in VB to truncate a larger data type ( an int with a value greater than 255) to a smaller one, say a Byte (which only goes up to 255) in a way such that the 8LSBs of the integer are copied to the newly created byte. I have tried this using CType with the following code, however it does not work.
Dim TestByte As Byte = CType(Test, Byte)
Where the variable "Test" is an integer with a value of 419. This code always results in the Overflow exception.
[code].....
View 2 Replies
Aug 22, 2011
I created a VBA project in Excel. I would like to figure out how to transfer the data back in forth to make a more presentable and user-friendly program in VB Studio.Basically, I need my form in VB to input data to into an excel �workbook.data�, where the calculations are preformed. Then I need to copy the finished excel data cells �workbook.results� and paste them into an end result form in VB. I have tried looking at threads and cannot come up with a solution. There is no data saved each time the program runs, so I don't have a database.
View 14 Replies
Dec 8, 2010
I currently have a bunch of numbers separated by tabs saved in a text file. Is there an easy way to copy the information from that file into .xls file and add additional information (like row and column names). I need the information to be in a report format. I am not sure the best way to go about doing this.
View 12 Replies
Aug 7, 2010
Is it possible to select an item in one listbox and then display the data of another listbox with the same indexed position? I am planning a project and this is something I would like to attempt but I haven't figured out how to do it.[code..]
I tried doing the above code but instead of displaying the listbox text the message box just returned false.
View 5 Replies
Mar 16, 2012
im using vb.net 2008 and i would like to ask if is it possible that if i click a data in my listview then it would go to another listview and using a db
View 6 Replies