Display The Id Value Incremented By 1 In A Textbox In Form?
Jun 16, 2011
i want to display the id value incremented by 1 in a textbox in my form but getting error in the line cv = reader("id") + 1 my code is
Imports System.Data.SqlClient
Public Class Form1
Public connection As New Data.SqlClient.SqlConnection("Data Source=AMIT-
[Code].....
View 3 Replies
ADVERTISEMENT
Jun 21, 2010
I have a database I am creating with about 50 users over a network. There are about 6 groups of users and these users are spread across 10 branches. I want to block/allow users from particular forms and views. For example I want branch users forms to be filtered by their branch number but depending on the group they are in they can only see some forms. i.e. 50 users, 10 branches, each branch has about 5 ppl of where 1 is in group A and 4 are in group B. I want all users that belong to branch 1 to see the information they enter, but Group B enter data but cannot approved or delete, and group A can enter, approve and delete. So then. On my login form I have the user type his/her username but the i want LEAVE function to update 2 textbox where I have named GroupName and BranchNo. Basically to run a query and look for the username and return in one textbox that user's groupname and the other textbox the user's branch no. This information will be used to filter forms and block the user from certain controls. This is the code I have so far but still can't figure how to display the results.
Private Sub UsernameTextBox_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles UsernameTextBox.Leave
'Make Connection to database
[Code].....
It keeps highlighting the BranchNumber and UserGroup and giving error "Value of type 'String' cannot be converted to System.Data.OledbCommand
View 2 Replies
Mar 7, 2011
Console.WriteLine("Network adapter: {0}", adapters[i].Name);
Console.WriteLine("Status: {0}", adapters[i].OperationalStatus.ToString());
Console.WriteLine("Interface: {0}",
adapters[i].NetworkInterfaceType.ToString());
[Code] .....
What I want is to have this Console.WriteLine displayed in a text box on the form but how to do it.
View 4 Replies
Feb 9, 2011
I am receiving RS-232 data from serialPort1.Readbyte and want to display the incoming data on a textbox on a form. This causes a "...cross thread..." error.
View 4 Replies
Jun 8, 2011
knows how to display autogenerated id on textbox in a form?for exampleif i have 2 textboxes
1st txtbox is for CustomerID
and the other is CustomerName
when im gonna add a new record
[code].....
View 1 Replies
Mar 5, 2012
I have a text box in form1 that displays the total, I want to carry this over to form 2 into another text box as I navigate between them, how would I do this? Also I have a button on form2 to return to form1 but I need all the data that has been input by the end user to be cleared from both forms when returning, again how would this be completed?
View 8 Replies
Jun 6, 2011
i'm doing a searching form, here is my code
Dim con As New OleDbConnection
Dim cmd As New OleDbCommand
Dim rd As OleDbDataReader
[Code]....
then after that i'm double click the 1 of the row in listview and 1 form popup with all data in database.
View 2 Replies
Sep 10, 2009
I'am creating a program that will input a number in a textbox for example 5 and display 5 textboxes in form...I have no idea how to do this but here is the code i've done..
textbox1.text = val(textbox1.text)
'i don't know what to do next..
View 1 Replies
Jun 13, 2011
know the title seems a little bit confusing, let me explain.Let say i have 10 properties of bindingsource.The names are: bindingsource1, bindingsource2, bindingsource3, ....., bindingsource10i want to develop a code using loop for these properties..
For i = 1 to 10
//bla bla bla
Next i
[code].....
View 3 Replies
Jun 18, 2008
When I rebuild a VB.NET solution (class-lib, winforms) in VS.NET 2008 prof, the assembly-version isn't updated anymore.This i a project which i used to open in VS.NET 2005, but converted to VS.NET 2008 (no code changes, because is a ms.NET 2.0 project)I have the only following in my AssemblyInvo. vb <Assembly: AssemblyVersion("2.0.*")> Before it worked in VS.NET 2005 (when I reopened Vs and rebuilded, the assembly-version info did changed). But now when i reopen the VS.NET 2008 solution, change something, rebuild --> the assembly-version info did NOT change. Even closing vs.NET 2008 an reopen, change, rebuild --> still no changes in the assembly-version...Why doesn't work this anymore (It still works in a C# project) ? My custom-auto-update solution uses the internal versions of the dll's, exe,
View 11 Replies
Jul 18, 2012
How to maintain Zeros in incremented values ex: ECJ-00001
[Code]...
View 5 Replies
Sep 7, 2011
i want to save the values from these code wriiten below,but the value did not incremented after saving.
[Code]...
View 13 Replies
Jun 14, 2011
Need advice on what is the best approach to get the auto incremented id to be the same on multiple forms.
Basically I am using VB .Net with SQL Server as the backend. I wrote a few stored procedures to insert data and then I am calling the stored procedures on the front end. I have 3 forms and once the first form is submitted it generates an autoID and then takes the user to 2nd form.
In the second form I have a separate insert stored procedure is there a way to grab the id that the first form generated and for it to be consistent. Or should I store it in a variable after they submit the form and then call it in the second form.
View 3 Replies
Nov 14, 2011
I have a simple application for taking Customer orders and their Products. I am using Visual Studio 2008 Express Edition and MS Access 2007.My application uses multiple forms. One of the forms is an Add form from where a New Customer along with his/her details like address, phone, city, state etc can be added. Another form is for the Product Details to be added.I want to know how to retrieve a CustomerID from an MS Access 2007 database for either the newly added Customer or an existing one and insert multiple rows or records for the same CustomerID, as a Customer can order multiple products. I am using the following code for the Add button:
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
[code]......
View 1 Replies
Feb 23, 2011
Im writing a program and its pulling data from a .MDB to put in a .DAT file.
Here is my while loop:
vb
database_connection()
sql = "SELECT * FROM tlalist"
[Code].....
In my database there are currently 6 rows. and only 1 row has the TLA_DAY column equal to 1, but for some reason when I look at the .DAT file it creates it outputs the result twice rather than only once.
Once JTLA_count increments it becomes "2", but the while loop still outputs as if its still equal to "1". Ive used breakpoints and the counter is incrementing fine.
View 3 Replies
Jun 25, 2010
create an auto incremented student no.in mysql using vb.net lyk 2006-141791
View 2 Replies
May 29, 2012
I'm creating a form in ASP.Net to replicate a paper form (I have no say in the design, I'm tasked with merely recreating it digitally). This form has many questions along the lines of "Answer yes or no. If yes, specify how much". I'm currently handling it by listing the question, and then having two radiobuttons in a group, one saying "yes" and one "no". To make this a little prettier, I've been using Ajax updatepanels that will only display a textbox to hold this yes value if the user selects Yes.Now I've been able to do this successfully, but each question is its own radiobutton group and has its own panel to update visibility, which means that the way I'm currently doing it there is a lot of redundant code like
[code]...
And so on for every question that has a yes/no option like that. I have no doubt there is a better way to do this. I was wondering if there is a way I could pass the panel associated with the radiobutton group so I could use a single method in the code that would fire for all radiobutton postbacks, something like (not real code)
[code]...
Or is there a better way to handle questions like this? I'm open to a different approach if it would cut down on the amount of redundant code that I'm typing now. I'm using VB, but I know C# so if someone is fluent in that with an answer I'd have no problem interpreting it.
View 1 Replies
Jul 21, 2009
I need code for a textbox countdown that will display text in a textbox in days.
View 13 Replies
Apr 8, 2011
I have a problem in timers, I want to display 2 forms each one after 3 and 5, how to do that? I mean when the first form appears, after 3 seconds another one will appear, then after 5 seconds the second will appear. I have a code where someone gave me here but its for message box only, thus I modify it to put a form still does not work. Here the code I put in the timer below:
Private Sub frmblabla_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
tmrnote.Start()
Private Sub tmrnote_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrnote.Tick[code]....
I still have problem when the message box stops, it displays all the forms together. All I want is when the message box stops, then it display the first form then stop to display the second then stop to display the last. The first form must stay for 3 seconds on the screen, then after 3 seconds the second appears then after 5 seconds the last appears.
View 2 Replies
Jan 8, 2010
Is it possible to have a Textbox on a form that when the user inputs data, ( during Runtime )that data remains in the Textbox for good and the Textbox then becomes read only ? Is it also possible to make it so that the CD with the programme on, is in the PC when the programme is being used. Perhaps writing the Textbox data back onto the CD ?
View 1 Replies
Aug 2, 2010
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.PictureBox1.Load(bm2)
[CODE]...
So I'm trying to take a screen capture of the windows form and display only a certain specified area of that screen capture in a picturebox on a different form. Kind of like this. First, take the screen capture of the form: Then get a specified area of that form through x,y coordinates or something and display it on a picturebox on a separate form.
View 1 Replies
Sep 27, 2010
Inside a form, I would like to display a pdf file which is already available in my resources (template file "untitled"). In this pdf file, I have some fields which get their values from some texboxes in another form. My aim is, when the user triggers the button to call this form, it should insert the values inside the pdf file and display the output pdf inside the form.I have written the code to an extend but could not finish it myself after my many trials... Now here are the two things I cannot manage:I can use a directory to read the template pdf "untitled1.pdf". But my aim is to use the file inside my resources. can save the output file in a directory but this is not I want to do. I want to display the output pdf.
View 1 Replies
Feb 3, 2010
I recently learned how to send the contents of a vb textbox to a flash textbox which is in an swf embedded on my vb form using a vb button to trigger...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxShockwaveFlash1.LoadMovie(0, "C:sample.swf")
End Sub
[code]....
This workds great, however what i REALLY want to do is the other way around.... I want to click a flash button thats in the embedded swf and have it put text into my VB textbox... The text I want to dislay is:"well done!" SO Far:I have built a simple swf with a dynamic textbox and a button. textbox is named "sampleField" and its var is: "sampleFieldVar"...button instance named "Button1" is an instance of "button".
using as2 I have put the following code onto the button:
(read this somwhere online)
on(press){
[code]....
View 2 Replies
Oct 3, 2011
i have been looking at how to get a textbox to display my ip, many show using winsock or webrequests to sites that diaplay your ip but is there any other way, like a simple way ?
View 2 Replies
Feb 18, 2012
I have a lot of control array textboxes called txt(1) to txt(320) on form2. I have a textbox1 on form1 with a click evet that says textbox1.text= form2.txt(1).text but it gives an error (txt is not a member of form2). I tried disabling option explicit, option strick and option infer. Still won't work. My code is to long for this place maybe a short version osf the code. Do I need to make a Public MyArray(15,15,15,15) as string, in the Module1 then copy txt(n).text to the array or is there a way to access txt(n).
Public Class Form2
DPrivate Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadim txtBox(340) As TextBox
[code]....
View 2 Replies
Jan 19, 2011
How does Visual Studio and other similar programs display a form in their IDE? Is it possible to achieve the same or a similar effect using C# or VB.NET?
View 3 Replies
Mar 15, 2012
my application have a main form. i have set the isMDIcontainer to true on the form properties. How do i set other forms to child form of the parent. i need to do this because the other forms start position is CenterParent.but as it is now when i run the program the other forms start position is not the parent form centre.Secondly, how do i disable the parent form when a child form is on display. so that user cannot click on the parent form until the child form is closed.
View 1 Replies
Sep 2, 2011
VS2010 VB.NET windows form app I have a login form that is my startup form.when uer hits OK I display the main form and close the login form, like this:
PrivateSub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
frmMain.Show()Me.Close()EndSub Problem is the application closes with me.close. Why? How can I close only the login form and leave the main form urnning???
View 3 Replies
Feb 17, 2011
how can i send a URL "https:[url].....without opening the web browser? and how do i get the response from it display it to my textbox? im using a vb 2008, can this possibly done?
View 3 Replies
May 3, 2012
I have some coding which reads a text file and shows certain columns in a combobox.[code]...
What I would like to do is just show column 1 in textbox1[code]...
View 6 Replies