So far i have a really basic form application that allows a user to enter some information and does a small calculation, displaying all of the information gathered on the final form.
Im looking to try to save this information but have no idea where to start,im trying to just take whatever is in my text field and put it in a table row. I created a one table database in Access and linked it to the form with a button to try and save it.
I thought it would be as simple as tablename.rowname = textbox.text or something but apparently not and all ive ended up with so far is this:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Me.Validate()
Me.TblCustomerBindingSource.EndEdit()
Me.TblCustomertableadaptor.Update(Me.DatabaseDataSet.tblCustomer)
End Sub
I dont even think im close, ive just been fiddling with the predefined code in Visual Studio, trying import ect but the button just doesnt seem to do anything.
Ok, as you can see I am totaly new with Visual Basic. I have learned all those loops, if&else statements, byval, byref and etc. But now, I want to create this kind of application. I have 3 textboxes. One will contain URL, second username, and last password. There is a listbox also and a button. I want when user add a values inside textboxes , that values go to listbox as one variable and then save those settings for user so when he start up application again there are saved variables inside listbox. I just dont know how to do that.
I had an Excel spreadsheet which I put in MS Access (database). I then took that database and used that as a source in VB to create a GUI for. In VB I have an input text box to search and pull of different fields. I created some queries for searches in from the text box. I have have a dataset view of the data which has the binding navigator (add, insert, save).
The problem I have is that when I hit the '+' for add to add information and then click the 'save' button in the binding Navigator, the information I put in does not save. I check this by exit out of the program run (debug to open the app) and then open it back up to search and/or check for the new information I put in. My overall goal is to create to publish the final code and use an a standalone program.
Also, as another option,(I would like to learn) Is there a way to map VB directly to an Excel file to have the user input information and save to the excel file.
Option Strict On Public Class Form1 Private Sub btnDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDistance.Click 'The btnEnterSpeed click event accepts and displays up to ten speeds from the user'and then calculates and displays average speed
[Code]...
I cannot figure out how to incorporate the number of days into the input box then get it to loop and count the number of times the User inputs in the number of days. Then I have to incorporate it into the equation to get the total distance D = MPH * Hours. What I have right now wil not count up the number of days and locks up after I input one number and will not add anything to the listbox. Because I also have to make sure that they cant add nonnumaric values and the number of hours per day cannot exceed 20. I have put things in and taken them out but it has been 2 days and I am lost now
I need something tje user can type in data to such a parts QTY cost etc. There are no predefined parts list so the user can enter any part name/Number and there is no limit to amount of parts that can be entered.
Does anyone have any idea what might be useful. It was thinks of a listview bu i can't see that you can type into that. I cant use comboboxs because there are no predefined list and i know there is some way to generate text at runtime (i think) but i don't know how to do it and i would prefer a clearer approach.
I'm just trying to create a graph where the user can input data into textboxes and then plot the data. I am attempting to use Zedgraph, but open to other suggestions. The program below creates a plot, but it won't update when the textboxes are updated.
Imports ZedGraph Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Currently the reports are saved as a html file called report1.html, id like to make the user enter a name for the HTML file upon clicking submit.
A little stuck on how to make the filename for the HTML file save to a input entered by the user.
I currently have:
Try 'Open new HTML file to be written WriteHtml = New StreamWriter(Application.StartupPath & "ListHardware.html") If Not (WriteHtml Is Nothing) Then ' Is the File Open
I have used following code to create and write the user input data to XML through Dataset. Hope it can be understood by looking the following code:[code]But the above code is not working. it is not writing the value in XML file.
How do I determin if a user has given me what I am asking for in terms of data type.
Example if my prompt to the user say "Give me a number of double data type"
How can I tell that the user entered a double xx.yy?
Or if I am testing for integers and I get user input ABC.GH?
I know about CDbl and CInt and CStr but these don't work unless data is provided. Also how do you test if the conversion took place? Also how do you differencate between 12.00 being integer?
I want to create a page in asp.net website . it has to have one text box . the user enter the productcode in the textbox and click on search . when the user click search i want to display all the information about that product from product table.
I have two pages the first one will receive all data that are required from the user such as username e.mail and then the same page will do the calculation but when clicking on result button two things should happen: 1-the result and all user inputs should be sent to the second page 2- the same information should be sent to the user email as the e.mail messege
I'm trying to make a program where user can input data from a textbox into an array and when the user hit the enter key, it compare it to a data grab from a text file. Here is my code so far:
Private Sub TextBox_KeyDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox.TextChanged Dim input As String
[Code]....
I got the part where the program can graph data from text file and put it into an array called "varia3". The part I could not get is allowing user to enter data into the textbox. When I run the program, the sec I try to enter a letter or number into the textbox the program ended.
So I'm developing a Windows Forms Application in Visual Basic 2010. The user searches for data and fetches results, updates fields and some other CRUD operations. I want to provide a user input validation. Usual stuff i.e. some fields need to be always numbers>0, others need to be non-empty in order to avoid Null access on some objects and others just need to be some fixed strings.
I am working on a program where some application config info is stored in a Userconfig.xml file. I am loading the file as an XMLDataProvider in the XAML via relative URI:
I have a number of items throughout bound to elements in the document and an event handler that saves to the XMLDataProvider:
Private Sub SaveConfig(ByVal sender as Object, ByVal e as System.EventArgs) 'TODO: Add event handler implementation here Dim SavePath As String = UserConfigDataSource.Source.LocalPath.ToString
[Code]....
When this executes I get the error "This operation is not supported for a relative URI". Is there a good way to produce an absolute URI (aside from getting the assembly executing location and trimming the executable filename from the end)? I expected this to be a somewhat simple procedure.
It's been a good few years since I dabbled in VB and I'm very very rusty so any help would be great! What I'm looking to do is search an access database with user input and display the relevant record.I have a single table set up in an access database called school_info with the following fields and data:
I've linked the database to my new project, connected the database and added the 4 fields to my form. When I run it, the data shows in the boxes fine.The Tres and DfE fields are show in text boxes on the VB form, and the school and Type are show in labels. What I really want to do is be able to manually type in either a Tres or DfE number into the relevant text field and have the other labels auto populate with the relevant data that's stored in the database table.
i have a access database with two tables, one for customer and one for booking.
I then have a form application i made in VS 2008 which lets a user enter details such as their name phone number ect into text boxes.
All of the information the person enters thoughout the program is shown via labels at the end, all on one form.
Would it be possible to then have a button that when clicked saves all of this information into the access tables into the correct columns, im sure it must be possible i just don't really know where to start.
I've worked out how to display charts in VB 2010 Express, but now I'm needing the user to input data into a spreadsheet/table that will be used within the program. I know that table is no longer available and neither is the OWC11 set. Is my remaining option then to use DataGridView? I know it is SQL based and I don't have much experience there yet, but I didn't want to commit to it if there is another method that would work just as well. The values that are put in by the user does not need to be preserved.
I'm developing a windows forms application using VB.NET. I'm currently working on DataReport (by Microsoft, not Crystal). Everything works fine when using DataSet as DataSource. But I have a question on how am I going to put data to my DataReport from a user input? Preferably when the user is on the act of printing(clicking the print button in the ReportViewer), a Form will pop-up and ask him for input. That input I'm talking about is random names of people, and we don't have to track their names so there's no reason to put it on the database.
I want to work on a project I have in mind and this envolves saving data which would need to be updated every time the user exits the program. I suppose I need to know how to save a file to a blank text document, and how to get the application to read the information when it is called for. I believe I need to set delimiters or such, the helpfile is useful, but limited and some information is not listed at all.
I created a sql stored procedure that will insert data for me depending on user input. Now I would like to know usually I would do something of this nature
Dim con As New SqlConnection(connectionString) Dim cmd As New SqlCommand("usp_userinput", con) 'references connectionstring and calls store procedure cmd.CommandType = Data.CommandType.StoredProcedure 'sets default to be storeprocedure lblMessage.Text = String.Empty With cmd.Parameters If (Session("UserInitials")) IsNot Nothing Then .AddWithValue("@UserInitials", Session("UserInitials").ToString()) End If End With
That is just an example how i usually approach calling the stored procedure in vb. However for this particular form I am going to have 50 or 60 textboxes which each one would require a session state variable.Seems a little tedious to have to create a session state variable for each textbox on the form.
I am currently using double data types. The problem I am encountering is that sometimes the user will have to input a value of 0 in the required text box and this creates an error. My question is what data type will allow the user to input 0 and allow the mathematical functions to work properly. Decimals maybe?
rewriting a class I use for saving Treeview data to a XML file for use of saving ListView data I can't really figure out the rewrite, I'm stucked, unfortunately Listviews seems to be a big problem for me in general.
Option Strict On
''' <summary> ''' The TreeViewDataAccess class allows the nodes within a TreeView to be ''' persisted to xml for later retrevial. ''' </summary>
I need some help with the input validation of my application. Attached is the code that I have written as well as a screenshot of the front end. I specifically need input validation to verify that the user selected input for cbLengthOfStay is a number between 1-10 as well as input validation to verify the user input for txtMedication, txtSurgicalCharges, txtLabFees and txtRehabilitation is a positive numerical number. Please feel free to critique my attached code. [Code]
If my Category and Forum selection is incorrect I am sorry and feel free to move it. I'd like to have the users input in the message box that will show. For example: There is a textbox and the user puts in their name as Bob. Then the message box would be: What my main goal is, is being able to include the users input they type inside the textbox inside the message box.
I'm trying to save what the user types in the vb code Dim user as Inputbox("") for example in a .txt file i can save the textbox and listbox but i cnt figure out how to save the inputbox i really need this to be saved the most.
I'm currently writing a program that needs to open a file specified by the user, replace a certain string of text with a different string of text, and save it to the user-specified path. Here's what I have so far:
Private Sub forceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles forceButton.Click Dim writer As New IO.StreamWriter(OpenChart1.FileName) Replace("", "E *", "N 5 0") End Sub
Currently I am saving data from my applications by saving a text file via a stream reader as a string. I have come to a problem. In my current application, I have an array of the following structure:
I am creating a form for work where managers can report when they find a customer's personal information laying around on a desk (we work at a call center where agents answer calls for a wireless cell phone provider, so we take personal information security very seriously). Anyway, I am wondering if there is a way to have a text box autofill with that manager's windows username (since they will need to be logged into their own profile to use the form).