I make a little program with vb.net 2005 and sql express version. I make a form and add two text boxes named, txtID and txtName. Add the database, project>new sqldatabase and named Database1.mdf. I create one table name Table1 and that include two column named ID char(10),Name char(50).Then I add a module and inside that module, I write the following code, [code] And I press F5 and run that Okey and show ID = 3 in txtID.(I already insert 2 rows of data in table1)My question is here, I want to add one button that will save new data into Table1 from Database1.mdf. And also please explain me how to write upade and delete the row from table1. And also want to know how to use crystal report.
I am trying to follow the book 'Sams teach yourself VB 2008'. It was going well until the end of hour 4. For exercise 1 I have created the form with a button and two text boxes, but cannot work out the code I need to move text between the two boxes. The Object Browser does not seem to help - am I reading it wrong?
Public Sub RandomNumbers() Dim s(4) As String Dim RandomNumber As Byte
I don't know if you can tell what I am trying to do here, so I will try to explain. I what to create for random numbers and place them into for different text boxes. I also would like to do this with combo boxes and their selected indexes. So if the combo box has 10 items in it; the new selected index would be the random number generated above.
I'm in the middle of creating an application that will be used to input customer information whilst the customer is speaking to someone over the phone. This involves the customer giving the employee information such as name, address, postcode etc and the employee inputting that information into text boxes and combo boxes that are in the application.
What I would like to be able to do is after the customers information is given over the phone, I need to be able to send that information to a database which will probably most likely be done by button click. In this case, I'm using Microsoft Access. I'm also hoping that I can do this within Visual Basic coding.
The database is set out with multiple tables which include a customer table and a ticket table and both have multiple fields such as first name, surname in the customers table. Both of these tables are in use with the information that the customer gives over the phone.
I've already asked on other forums and people are where replying giving me third party programs that I could use to implement this, something I don't really want to do.
I'm in the middle of creating an application that will be used to input customer information whilst the customer is speaking to someone over the phone. This involves the customer giving the employee information such as name, address, postcode etc and the employee inputting that information into text boxes and combo boxes that are in the application.
What I would like to be able to do is after the customers information is given over the phone, I need to be able to send that information to a database which will probably most likely be done by button click. In this case, I'm using Microsoft Access. I'm also hoping that I can do this within Visual Basic coding.The database is set out with multiple tables which include a customer table and a ticket table and both have multiple fields such as first name, surname in the customers table. Both of these tables are in use with the information that the customer gives over the phone.
Im trying to make a program that allows the user to view additional information via moving the cursor over the label to view (make visble) additional information, in the form of text boxes and/or picture boxes. How will i go about doing this?
how to move info from text boxes on one form to binding source text boxes on another form. I am displaying array info in text boxes on one form and i need to add them to the database on another form. How do I do that?
I want my application to open a web page that has an iframe within it named "test_iframe". Now I want to obtain the text being displayed in test_iframe. How do I get this content (I dont need the HTML code, only text being displayed in that page). Also if the iframe is hidden, can I obtain the content in such a scenario also?
I've been writing a weight program for flooded pressure vessels and I'm having trouble retrieving the data from the text files I've been saving. I know how to write the data to the text file, but retrieving it with OpenFileDialog is not so easy for me.The user has individual text boxes that they input strings or numbers into and when they save the file, each text box input is written to one line in the text file. For example, the first text box is for the username, therefore the first line of text that is saved is the person's name, the second text box is the customer, thus the second line in the text file is the customer name, and so on.
(Actually, the first line of text in the saved file designates whether English units were used or Metric units because when the user retrieves the saved file, English units will open one form and Metric units will open a separate form, so some If...Then statement will need to occur).I need to be able to read the first line, have either my "EnglishForm"form open or my "MetricForm" form open, and then have each subsequent line of text be displayed in their corresponding text boxes. I know I need to use ReadLine or LineInput, but I don't have a clue what to do.Assuming the syntax I've displayed below would just magically work (if only life were that easy), it would look something like this
If FirstLineOfTextInFile = "English" Then EnglishForm.Show() ElseIf FirstLineOfTextInFile = "Metric" Then[code]....
And so on...I read a lot of articles from the MSDN library and exhausted each link that I've looked through from Google and Bing, but most only retrieve data from the file to a single text box through some loop or streamreader and don't take into account multiple forms.
i am trying to automatically generate multiple text boxes on a form with the following code
Private Sub CreateTB(ByVal x As Integer) Dim y As Integer = 1 Do Until y = x
[Code]...
i need it to generate as many text boxes as the variable x states, so i used the do until loop thing. But i am stuck when it comes to naming the text boxes because obviously all the text boxes cannot share the same name. so i would like to know how to programmatically name each textbox uniquely.
I want to split each line at the comma and write the left side to a textbox and the the right side to another textbox. I'm close, with the code below, but I can only post results from the first line in the file. How do I loop this and append the text results in each of the textboxes.
Dim TempFile As String TempFile = "temp.txt" Dim sw As StreamWriter
how to permanently save to text files then re-open all of the information again using SFD and OFD. Now my teacher has come back at me and said that i need to be able to save the information from multiple text boxes and have the text in certain labels to also be saved into the one text file (the labels need to be done because it is a database and these labels are like the fields and the right text box needs to match the right label)
I'm trying to make a small database out of text boxes and text files, something where sql would be overkill, not to mention beyond my experience. I want to be able to write the contents of the text boxes to a file.txt (the easy part) then being able to retrieve them back out into individual text boxes. How would I pull this one off?
I have a text file containing 10 pieces of information. I want to read the information from the text file and put it in text boxes on a form, so that the user can view the information and edit if required. What is the best way of approaching this?
I need to to able to save multiple text-boxes and a combo-box to a text file. the thing is, when I go to save, I check out the .txt file manually and its saved all in one line, no spaces. when I go to "read" it with the 2nd part (<-----this is a 2 part Challenge) it even reads all from that one line in the text file. What i'm asking is how can I make my text-boxes saved in the text file on different lines. [Code]
I have code to show I tried to do it on my own, to boot!
Private Sub OpenPetProfileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenPetProfileToolStripMenuItem.Click Dim AllText As String = "", LineOfText As String = ""
[Code].....
This save command works perfectly except for the lstshowresults, which I'm having issues getting to appear in the print line bit, but that's for another time.
I have a text file containing ten pieces of information (5 prices and 5 descriptions) I want to load the information from the text file in to the text boxes, so that it can be viewed and edited if required.
I've declared the filename, and various variables, but I'm not sure how to get the info from the file to my form?
filename = CurDir() & "/charges.txt"
Could I use something like this:
fileopen(1, filename, openmode.append) do while not EOF(1) ... ...
What i am trying to do is save text from a number of text boxes to a user named file then subsequently be able to reload the data back into the same text boxes at a later date.so far i have this which was provided for elsewhere on the web, this allows me to save comma delineated data to a file which is fine but i can't seem to reload the data. As an experiment i have just tried to reload it back into a rich text box to see if the process would work but nothing as yet.
Private Sub SAveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAveToolStripMenuItem.Click Dim savedfile As String savedfile = TextBoxinc1.Text & "," & TextBoxinc2.Text & ","
I have Three text Boxes and i want to use Cut, copy, paste method.But the problem is when i copy one text box matter and then apply Paste option through menu control ,then matter is displayed all three text boxes.
I am using many text boxes in a form. How do i validate them, In certain text boxes I have to use only text and in some I have to use only numbers. Is using ASCII is a right method or is there any easier method to do this. If so please let me know the coding.
I am starting out in Visual Basic.Net and need a bit of assistance.I am creating a Windows form (not controls).In this program, I am attempting to validate 2 different text boxes BEFORE the rest of the controls can be validated. For example:I have an authorTextBox and titleTextBox, which the authorTextBox MUST have some user input BEFORE the user is permitted to move onto the titleTextBox. (the user input can be fake like "John Doe", the point is to force the user to input something).The instructions that I was given is not very clear on how to code this properly in order to have the form show an error message requiring the user to input something in both textboxes before they are permitted to move onto the other controls.
So I'm in the final stages of finishing a program I've been working on for nearly a year now, and this is basically my final hurdle. The Save dialogue is working beautifully, with 'flags' in order to switch it over from the regular input into text boxes to the Listbox input protocol.
However, I'm having a *** of a time getting it to take lines from the text file and put them in the proper text box. Here is an example file:
Quote:
SHOWNAME CALLNAME BREED
[Code]....
So with the sample file I provided above, in the textbox named callNameText would appear "SHOWNAME", and so on and so forth. With this build, I get a NullReferenceException on the "Me.Controls(strboxNames(i)).Text() = strAllText(ati)" line.
I have a small requirement and that is as follows: I am calling a stored procedure and based on the results from the stored procedure, i want to display the data into textboxes. I am using DataSet and DataAdapter for the same. Can anyone help me. My code is as follows:
Dim sqlStripCmd As New SqlCommand("prcAdt_mwo_strip_det_sel", connection.conn) sqlStripCmd.CommandType = CommandType.StoredProcedure sqlStripCmd.Parameters.Add("@strip_no", SqlDbType.Char, 3).Value = txtMwoStpNo.Text
[code]....
I am getting the data and am able to display it into a datagrid, but how do i put it into textboxes.
I have multiple textboxes with values..... The subtotal is populated and read only Freight and FOB charges when eithor is changed, needs to update the total.... What is the best logic for this?
I am trying to make a very simple vb application, and to do it i need to add up the value of two text boxes and diaplay them.Eg:If i put 10 into txtbox1 and 5 into txtbox2, How can i get txtbox3 to diaplay 15?