Results 1 to 8 of 8

Thread: [RESOLVED] How To Update Data Display By Textbox/Label

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    15

    Resolved [RESOLVED] How To Update Data Display By Textbox/Label

    I've create form that can read data from com port. I'm using this code :
    Code:
    Private Sub MSComm1_OnComm()
      
      Dim strInput As String
      Dim intI As Integer
      With MSComm1
        
        'test for incoming event
        Select Case .CommEvent
          Case comEvReceive
            'display incoming event data to displaying textbox
            strInput = .Input
            Text1.Text = Text1.Text & strInput
        End Select
      
      End With
    Rite now I'm trying to do something else using the same code. What I'm trying to do is when the data output from COM port is updated n I want to show it back in the same textbox. I mean replace the data with the new one. Can someone point me to something or mayb edit the code above.

    PS: U can refer to my previous thread here -> http://www.vbforums.com/showthread.php?t=524024

  2. #2
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: How To Update Data Display By Textbox/Label

    Have you tried this?
    Code:
    Private Sub MSComm1_OnComm()
      
      Dim strInput As String
      Dim intI As Integer
      With MSComm1
        
        'test for incoming event
        Select Case .CommEvent
          Case comEvReceive
            Text1.Text = ""                              ' Clear TextBox
            strInput = .Input
            Text1.Text = Text1.Text & strInput
        End Select
      
      End With
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    15

    Re: How To Update Data Display By Textbox/Label

    Thanks CDDrive. Its really help me.

    Now for the second part...if its ok with u.
    This code is form Form1. In this form i've 3 command button. Approve...Deny...View Details. I want to parse the data from the Form1 to Form3(View Details). The View Details command button will open new form(Form3) that show details on data received. This form is connected to database and will show the details according the input receive from previous Form1. All this happen when i click View Details button on Form1.

    Is it could happen? If it can happen...what code should i write n how?

    Thanks in advance.

    PS: I just rate u. Thanks for ur help....

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How To Update Data Display By Textbox/Label

    Can you give us an example of the kind of text (details) that you need to parse, and please explain how you need it parsed?

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    15

    Re: How To Update Data Display By Textbox/Label

    Ok..i'll try to explain more.

    I'm trying do develop system that can read data from COM port. This com port i've attached to rfid reader. I've 1 form to detect this data from the com port. So its working great. Now...in this from i've 1 text box(the input come from com port)....3 command button (Approve...Deny...View Details).

    Its workflows is like this...fisrt the text box box catch data(in string). Then i click button View Details and it will parse the input from the text box to next form(View Details form). In the View Details form it take the input from previous form and execute searching in database. Then it will show relevant data according to the input i get before in this form.

    I hope u could understand what i'm trying to explain here. If not...i'll try to explain more.

    PS: Tell me which u 1 u don't understand. Sorry for my poor English.

  6. #6
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: How To Update Data Display By Textbox/Label

    Members will need sample of text to parse and schema of relevant database tables in order to assist. We don't have crystal balls, so the answer you'll get is as good as the explanation you give. The best answer you'll get so far is either "yes, that's possible", or reference to related links on parsing and queries which you'll have to modify to suit your needs.

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    15

    Re: How To Update Data Display By Textbox/Label

    I attach form that i'm working on it. I can't think clearly. Gone blur on this. Can someone help me on this...

    Thanks in advance...
    Attached Files Attached Files

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    15

    Re: How To Update Data Display By Textbox/Label

    Sorry folks... The problem is solve. I'm applying same step as CDDrive told before. I also adding adodb conn...then it solved.

    Thanks for read my post n helping me out. Thanks guys...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width