Join 307,125 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,070 people online right now. Registration is fast and FREE... Join Now!
hi i'm steve, new member guys/gurls. i really like vb.net thats why i decided to familiar it with it. i know this is very simple for you guys. i've been thinking and trying what to do how to check a variable if it has value. i would like to ask you guys how do u check a variable if there is a value in it? using if else in vb.net 2003..thnz guys/gurls in advance.
this one is working but i'm trying to enchance it. thnz
CODE
Dim flag As Integer Dim dr As DataRow Dim dt As DataTable Dim custid As String Dim bm As BindingManagerBase
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load OleDbDACust.Fill(DsCust) bm = Me.BindingContext(DsCust, "CustomerTracking") bm.Position = 0
End Sub
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click txtCustID.Text = "" txtFName.Text = "" txtLName.Text = "" txtAddress.Text = "" txtPhone.Text = "" txtEmail.Text = "" flag = 1
Dim ctr As Integer Dim len As Integer Dim custid As String Dim custidval As String
dt = DsCust.Tables("CustomerTracking") len = (dt.Rows.Count - 1) dr = dt.Rows(len) custid = dr("custID") custidval = Mid(custid, 2, 3) ctr = CInt(custidval) If ctr >= 1 And ctr < 9 Then ctr = ctr + 1 txtCustID.Text = "C00" & ctr ElseIf ctr >= 9 And ctr <= 99 Then ctr = ctr + 1 txtCustID.Text = "C0" & ctr Else ctr = ctr + 1 txtCustID.Text = "C" & ctr End If txtCustID.Enabled = False
End Sub
*Psychocoder added code blocks
This post has been edited by PsychoCoder: 19 Sep, 2007 - 12:01 AM
hi i'm steve, new member guys/gurls. i really like vb.net thats why i decided to familiar it with it. i know this is very simple for you guys. i've been thinking and trying what to do how to check a variable if it has value. i would like to ask you guys how do u check a variable if there is a value in it? using if else in vb.net 2003..thnz guys/gurls in advance.
pandahuge,
This thread is only for requesting a tutorial that isnt in the Visual Basic Tutorials section
I posted this on a similar thread from you in the C# forum.
A tutorial about socket programming and packet manipulation would be great. The latter might be difficult in some aspects without the use of pointers but if there's a way I would actually prefer a VB.NET tutorial. Otherwise C# would also be cool, as long as you would take the time to write either version.
I'd like to see a tutorial for "Windows Forms Designers". I'd like to let the user to make changes in a form at run-time. Im working on a print CD label project.
Just read the suggestions for a database tuturial for begginers in VB 2005 or 2008 express. I would be very interested in this tutorial, as a Total newbee and Hobbist I have found it relatively easy to create and use a database following the tutorials in books and on the internet etc. However they all seem to fall short as to utilising them effectively. It would be nice to see a step by step tutorial which breaks the tuturial down in different stages. IE creating the Database, Creating the Interface etc. It would be nice to see examples such as adding a columns values together and showing the total in a textbox. I think you get the picture. I used a tutorial called Simple fixed array 1,2,3 in the Visual basic tutorials. I found this format easy to follow.
I have written a tutorial named SQL Basics in VB.Net. Read through this one and see if this solves your question
Cheers for that PsychoCoder.
I had already downloaded this tutorial but work keeps giving me things to do, PAIN!!!. So ive not had time to get stuck in yet, Hopefully this weekend. It looks like what i am looking for . If I have any questions do you want me to post them in the said tutorial.
sharpy, yes if you have any questions just post it in the tutorial itself, that way if anyone else has the same problem they'll see the resolution there
I was wondering if you could write a tut on deploying applications using SharpDevelop. This should help as it is an open source application. Im not quite sure on how to use it myself (despite the fact I recommended it to two people ). Thanx!
This post has been edited by Louisda16th: 14 Oct, 2007 - 09:03 AM
How about one to send and receive data through a USB port (Like the one for serial port in C#)? Its something I really want to learn . Or is it the same as communicating through the serial port?
How about one to send and receive data through a USB port (Like the one for serial port in C#)? Its something I really want to learn . Or is it the same as communicating through the serial port?
{Link Removed}
Hope that helps.
RogerB, sorry for removing your link, but this thread is for tutorial requests to be written on </dream.in.code>, not for providing links to tutorials on other sites
PsychoCoder
This post has been edited by PsychoCoder: 10 Nov, 2007 - 05:53 AM
I thought this was in the Tutorial section... Perhaps someone could move it to where it belongs, I can not move or delete it.
How about a tutorial on how to create/edit/save Excel workbooks?
I have a ton of VBScripts that I am trying to bring over into VB.Net. Your excellent Active Directory tutorial helped immensely. Now that I have a pointer how to get the data out of AD I would like one on how to put it into Excel or perhaps a data grid.
This post has been edited by Mr Ed: 17 Nov, 2007 - 11:30 AM
I wouldnt mind help on arrays especially a 2-dimensional array. Its so hard to find info for 2 dimensions, only one. Interested in suming the rows or colloms or writing and reading to and from a text file using the stream reader/writer class. Also 2-dimension array with databaseses, sql and access. That would be very nice. Any help will be appreciated. Thanks in advance.
I'd like to see a tut for .net printing, that would be really helpful. I've searched and there are not very many for that, and the ones I've found are kinda vagueish.