Storing Information In A Form?
Jan 26, 2011
im writing a program for my vegetarian girlfriend that does two things from the main menu. 1: add foods with attributes like name, iron content, protein, sodium etc. 2: use the foods that have already been stored and use them to make a balanced meal. What im having trouble with is, how do i save the attributes when storing the foods ? i have knowledge with c++ so i understand how classes work and was wondering if there is something similar in Visual Basic.
View 2 Replies
ADVERTISEMENT
Dec 21, 2011
I am creating a program with multiple Forms designed to track multiple projects.The first form is designed to setup new projects and obtain previous projects, from there the other forms open to be filled in with information.For new projects the next forms open blank but I then need these later forms to be tied to this project name so that it can be selected from a combobox and the information will be already populated.tieing the information on the later forms to the projects populated in the combobox so that it appears when a specific project is selected.Is this able to be done without creating databases?
As an example, say I create a new project then a new form opens and I add some information to a textbox.I would then like to be able to save the information so that the project name moves to the combobox on the first form (I can handle this) and the information input in to the textbox is tied to the project name so that when the program is reopened and the project name is selected the second form opens with the textbox populated.
View 3 Replies
May 22, 2009
I am making a program that stores information for my applications. There are 4 main things I need in the XML file, the login information (User name and password), Application names and keys, and the owner of the application (who bought it). The program allows the user to enter as many applications and owners as they want and once login information is correct it loads the data. Then on exit all the data saves to a XML file.
My XML file looks like this
<Data>
<Login>
<UserName> (UserName) </UserName>
<Password> (Password </Password>
</Login>
<Applications>
[Code] .....
View 6 Replies
Jan 23, 2012
I'll try to explain what i'm doing here, i wan't look through a text file, adding certain lines to an individual array element. So i want to build an array with mcode, mTitle, mCredits, mSemester, moduleStats, currentYear <--- this information as an array element. So here is my attempt at the code,
Dim sr As StreamReader = New StreamReader("datasource.txt")
Dim line = sr.ReadLine() ' get each line and store it
Dim currentYear As Integer
[code].....
View 7 Replies
Apr 22, 2010
I have a list of names in a database and what i want is to get all of these names and display them in a label or a text box to the user on the website. I have tried to do this using a for loop but it is always overwriting the label each time. I have a list of 10 different names in the database and what it is doing is putting the first name in the label and then overwriting this with the second name and so on until it reaches the last name. I think i need to store each of the names from the database into an array or an arrayList and then make the label display all of the contents from the array or arrayList. The for loop i have used for this is:
Dim g As SQLadmin = New SQLadmin()
g.DB("SELECT nameOfPerson FROM Persons")
For i As Integer = 0 To g.array.GetLength(0) - 1
[code]....
i can select the names from the database and store them in an array then make the label display each of the names.
View 6 Replies
Nov 22, 2009
SI have a form and on submit I need the following variables stored in array.
Dim OrderName, OrderNumber, OrderSize, OrderQuantity, OrderAddOn, OrderEachPrice, OrderTotal As String
So pretty much its an order a customer will be making and every time a new order is placed, a new array will be made.
Example:
OrderName = TextBox1.Text was Sean
OrderNumber = TextBox2.Text was 123456
OrderSize = TextBox3.Text was Large
OrderQuantity = TextBox4.Text was 2
OrderAddOn = TextBox5.Text was Pocket
OrderEachPrice = TextBox6.Text was 10
OrderTotal = TextBox7.Text was 20.00
On submit a new array would be created and would be something like this:
Dim ArrayName(,) As String = {{"Sean", "123456", "Large", "2", "Pocket", "10", "20.00"}}
BUT a new array has to be created each time the submit is clicked.
View 6 Replies
Dec 18, 2010
using one form information to be transferred to a second form the code becomes invalid after an validation error has arisen from the first form (ie no adult passengers was selected and the error message was displayed) when corrected the information to be transferred become incorrect as the information is transferred without the correction. [code]
View 1 Replies
Apr 28, 2010
I am working on a project that has the user building scrapbook pages through several different forms. When the user selects something a presses a button I have the information about the selection load to a list box which is on a CheckoutForm. One of the options I have is for the user to save what they have made (this includes the information in the list boxes) and return to a previous form to build another page. I have been trying to use the Me.Close() but it does not save the information and using Me.Hide() displays the wrong elements on the forms.
View 5 Replies
Aug 1, 2011
I have a main form and I've created another small form.In the main form I show the small form when they click a button, like this:
Button_Click Function
Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles AddButton.Click
[code]....
then the LicenseNewForm appears. The problem the I stumble upon is how I get the information from the license form to the main form when they click a button in the license form or close the license form. The information is more then just a simple input, so I can't use a InputBox call because the license form has 3 comboboxes and a textbox to get the input from the user and then I need to send that input to the main form.
View 8 Replies
Feb 27, 2009
I have a main form and I've created another small form. In the main form I show the small form when they click a button, like this: [Code]. then the LicenseNewForm appears. The problem the I stumble upon is how I get the information from the license form to the main form when they click a button in the license form or close the license form. The information is more then just a simple input, so I can't use a InputBox call because the license form has 3 comboboxes and a textbox to get the input from the user and then I need to send that input to the main form.
View 9 Replies
Nov 3, 2011
So my question is that I have 2 list boxes in two forms aside from the main one. and I am trying to transfer what I choose in the side form to transfer to the list box.
several questions: Why does the blank list form I have in the main form create a problem when I enter a name for the list box and why does it appear in the box when I put it there? As you can see in my errors. It doesn't seem to recognize the listbox that I wanted to leave empty in the main form.
Second question is how do I get names to add in the main form list box. I believe I have the right code but I seem to be missing something else as well. I want the names to display in the main list box and the integers to add up together so I can separately figure the tax and shipping myself.
Here are some pictures and codes
Main:
Print:
Audio:
Public Class MainForm
Dim frmAudioBooks As New AudioBooks
Dim frmPrintedBooks As New PrintedBooks
[Code].....
View 39 Replies
Jan 7, 2010
Get information from one form to the other ?
View 4 Replies
Feb 23, 2010
I made up Form where you need to fill in information like Name, Surename and Group. And when I press Next (button) I want it to check first if all information is given and in case its not, then you cant go to the next form before filling all information.
View 5 Replies
Dec 23, 2011
i would ask if i can take information from FORM to another one?like user enter his name in form1 and i need to use it in another form "form2"
View 5 Replies
May 27, 2011
I have two form
First 1 is main form name Form1
Second 1 is Form2
i want to get label1.text from form2 into form1.textbox.text
my example code
Code:
Text1.text = Form2.label1.text
this code work if both form are show()
but i want my form2 allways Hide()
View 1 Replies
Sep 28, 2011
i have a form that I need to do two separate functions, however about 95% of the code is the same it's just that last 5% so I don't want to create two forms. What I would like to do is when I click on a button to open the form pass it a variable or something so I can determine which of the two buttons were used to open the form.
Basically if Button1 is clicked do this if button2 was clicked do that...
View 1 Replies
May 2, 2012
Form 1 code
Me.Validate()
Me. CustomersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.BoardingschoolDataSet)
[code]....
Therefore that code above works perfectly as both of them saves information to the Customers table and waitingforApproval.The problem is here:When I open form2 which recieves information from WaitinforApproval database table(and I see it getting it from there as tableadapter works), I want to save the received information to the customers.So I have two data sets in here. Just like above So here I have created a button called confirm/save the data to customers. Hence I put this code in confirm button:
Form 2 code
Me.Validate()
Me. CustomersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.BoardingschoolDataSet)
And the current dataset set for this form is �waitingforApproval.So it doesn�t save the received information from waitingforApproval into the customers�
View 2 Replies
May 6, 2012
I wrote the below code for my final project and I need to pass the array players to the next form that I open called Game I don't seem to be able to make heads or tales of what I have read so far. I will just change where the team is loaded from but I want to do it this way.
HTML
Private Sub LoadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadToolStripMenuItem.Click
Dim strFilename As New OpenFileDialog()
Dim result1 As String
Dim numplayers As Integer
[Code] ......
View 3 Replies
Apr 11, 2011
Once I have inserted all details into my booking form I want to send some of the details to a form called "Daily Jobs Form", When I click the save Button on the booking form.On the "Daily Jobs Form" I have a row of TextBox's and at the Begining of the row I have a Button called "View Job" and When I click the "View Job" Button, I would like to be able to view the whole job. And Choose a driver who has Been Allocated the job.
View 11 Replies
Oct 17, 2011
I have been working on a small side project that will read in from a serial port and send off a email depending on what it receives. At the moment I am stuck with a problem of it telling me it cannot access the text box as it was created on another thread. Does anyone know what I can do with this error? I have tried using invoke statements but it does not seam to work. [code]...
View 2 Replies
May 3, 2012
i have two forms and two database tables in sql. my problem is that, in one form(form1) i can save information to another form (form2) but in form2 can't able to resend data back to form1.
Am using dataAdapters and dataSet to load the data into application.
Having been thinking about this issue but doesn't solve it. i mean shall i use select query or what?
In form2, i don't want to insert new information rather all i want is to resend the loaded data from form1 back to it.
View 1 Replies
Jan 14, 2011
Ok so I have an app using sqldatareader to fill a form that I have called frmInventory I have a lookup formula that access a sql database and looks up txtInventory and txtItem information. Say I want to lookup txtInventory and get all my relevant infor, then i close the form and lookup by txtItem, all of the txtInventory items are still on the form and have not cleared. I made a clearform formula to clear the data but it keeps repopulating. Is this because i have an open connection somehwere. i close all my datareaders and dispose of all my connections so why is this information still reapearing after i close the form and reopen? Ive tried everything:
using
end using
if statements you name it.
View 1 Replies
May 13, 2012
So I have a list of book branches in an array called _branches. I need to write a procedure that adds branch names to branchNameListBox. Then I have to write a procedure that displays the information on the branch currently selected in the list box. The information should be displayed in sealPictureBox (branch image), cityLabel,nEmpLabel, and totalSalesLabel.This is what I have but the _branches are underlined in blue and it says the it cannot be indexed because there is no default property. what does that mean and how do I fix that?
Public Class BranchInfoForm
rivate branches() As BranchInfo = getBranches()
Private Sub BranchInfoForm_Load(ByVal sender As System.Object,
[code].....
View 2 Replies
Mar 5, 2010
create a form with a seperate window attatched. At the moment i can open the 2nd window and save an integer there close the 2nd window and reopen it and the information is still there, but when i close the main form and reopen it the information has gone is there anyway to keep the information?
View 5 Replies
Dec 23, 2011
how can i send the content of any form to specify email address on submit button. For example if anyone fill the contact form the on submission all the form data will be send to particular email address which we can specify in coding.
View 1 Replies
May 7, 2009
I am trying to input specific information on a form. I have created an sql statement from a table that will out put 18 rows of data. I have opened a recordset and instituted a do until loop. I need for the program to look at each row and if the Standard Score = the value of a field I have on the form it takes the value of the other three columns in updates it on the form. I have created the code and it works for upto 3 (Do Until loops)records, but when I try to add a 4th in the SQL statement and put in another do loop my computer runs it but it acts as if it freezes up.
[Code]...
View 1 Replies
Feb 18, 2011
I have a form in VB.NET and I would like the user to be able to click a button which will display another form (with the original form still visible).
View 1 Replies
Jun 7, 2011
Im suppose to make an application that tracks electric motors in a manufacturing plant. It needs to have
MotorID:Five-digit string, such as "02340"
Description:String
RPM: Integer, values in the range of 10 to 10000
[Code]......
I was thinking about doing this part in radiobuttons
The application should be able to store at least 10 motor class objects in an array, create an input form in the application that allow users to input new motor records to be added to the array and create another form that displays all the motors in the array in a list box. This is what I got so far, I know its not much, but whats really puzzling me is how am I suppose to show all the data in the listbox in the second form.
This is whatI got for the first form
Public Class Form1
Dim range As Integer = 0
Dim voltage As Integer = 0
[Code]....
and the second form I really dont know where to even start on that one.
View 17 Replies
Apr 26, 2009
I have a total of 4 forms, the first three of which have information that is totaled on each of those three forms respectively .I'm trying to figure out the best way to set up a final page where each total amount from the first 3 forms will end up on the 4th form so that the sum of the totals from the first 3 forms will add up, and then so I can add 7% on for taxes on this project.I am using both radio buttons and check boxes for the first three forms (and I'm not certain if this would be an important factor).I had been looking at creating a listbox, but I'm not sure if it would be possibly to get the previous totals to show up correctly there, so I suppose I'm just looking for a way to have the "products" from the first three froms show up in a list along with their prices, and then be able to add on the tax and total them all together.
View 4 Replies
Mar 15, 2012
someone give an idea or guide to do this: i have two forms. First form is used to ask from, to, departure time and how many people we want to book for. Second form is used to ask for each person that we book what is their name, age, title, phone number. i planned to use a loop to loop form 2 to ask for their info. However i woner how we can do this?? can a form be an array to loop??
View 1 Replies