Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Simple Data Display Control?


I’m trying to coerce the DataGrid control into displaying output from my application – there are no databases involved; I just want to display (8) columns of output with headers in an orderly fashion so that it can be viewed and printed. Is there an MS control that’ll do it simply? The help system is, as usual, as helpful as the proverbial chocolate teapot - or perhaps I'm just too thick to ask the right questions .....

Dave




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Display A Form Control's Text/caption To A Data Report Control
Hi to all!!!

Any idea on how to display a form control's text property/caption to a data report control?

Say, I have a form(frmProcessCustomer) that accepts a customer name in a textbox.Then I would like to display the customer name from the textbox(.text property) to my data report using rpttextbox/rptlabel when I view the report...

Data Control Display?
I have just learned how to use a data control to change info for my football pool program. Primarily the weekly schedule of games, yet I don't know how toomake the controls' text display the week # that i've switched to. I would like it to display "'Week 2" when I change to that week. What am I missing here?

Data Display In The DataReport Control
Hi,

I have a DataReport control that I use to show certain records on a Recordset, which has a field with boolean (true-false) values. On a regular Access database, this would be -1's and 0's. So what I need to do is not to show the -1 and 0's but to show something instead of that. I mean, something like "This is true" instead of -1 and "This is false" instead of 0. How can I do this?

Thanks,
- Lucas

Data Display Using Control Array
Hi All,

I have a backend Access 2000 database. The front end is in Visual Basic 6.0.
Using a standard form I have retrieved records from the access database based on a specified condition. The data retrieved is displayed in the form using control arrays ( mainly labels ). But the problem is that some part of the data which does not fit in the form is not displayed.

Can the above problem be solved using vertical scrollbars? Please do not suggest using data reports because my requirement is using a form.

Any help in this regard will be highly appreciated.

Thanxs in advance.

How To Display Data In DataGrid Control
please tell me how to display data in DataGrid control, the simplest way to do it. please this is very urgent to me

What Control To Display Data As A Report ?
I need to display data from database like a report but I don't know what control is the most useful ? If I use MSFlexGrid, how to insert data after select from database ? Thanks for help.

Data Control To Display Only Certain Records
i have a subroutine that prompts the user for a case number; if they type in 000000 i need all the cases w/ 000000 to show up in the form and the user can click the arrow on the databound control to go through only the records with a case number of 000000

also how could i show all these records using a grid; i need a number they input to pull up a grid w/ all the records relating to that inputted number; like the 000000. So every case number w/ 000000 would appear in the grid. It needs to be exchangeable though depending on what number is entered by the user.

Need serious help!!!!

Thanks

Display Of Tabular Data--Control Needed.
Hi,
I am trying to display a set of tabular data which sometimes can
run long.At present I use Heirarchial Flex Grid and it does not
provide a gud User Interface and the readability is poor.I am
thinking of displayin them in a HTML page in the VB application
itself with some good GUI(Say like hyperlinks, etc.).So please
suggest a method to acheive the same ASAP.
Thanks in Advance.

Huge Data Display In Listview Control
In my project there is a situation where in i may have to display one lakh to 10 lakh records in listview control.the code i have written takes 5 min to display the one lakh records but the problem the form that has the listview control appears as though it is hung and user cannot do anything on the form.
So i want to display the data in chunks so that the system is not hung and user can actually start seeing the records that are fetched and scroll.(similar to find files dialog where in if some files are found it keeps on displaying and still the search is on and i can still scroll top and bottom)

if anyone can help me i would be glad

Can Data List Control Display More Than One Field?
I currently have a data list control that is bound to a table in my access database. It displays one field for each row in the table. I would like to display two fields of each row. Can a data list control display more than one field in each list item or do I have to retrieve each row and create my own list?

Thanks,
Tracy

Simple Data Control Question.
Hello.
I use this code to connect to a .mdb database with a Data Control


Code:

Sub Son()

Data1.DatabaseName = App.Path & "DataMain.mdb"
Data1.RecordSource = "select * from Table1"
Data1.Refresh

End Sub



My question is: Can i connect to a password protected database with a Data Control? If yes, can you give me the code please? Thnx.

Data Control Problem - Probably Really Simple
i'm not sure about the data control, but when using the ado control, when a change is made in a bound text box, the changes should be automatically made and saved in the database or this may work...not sure tho!

data1.recordset!fieldname = text1.text

good luck

DAta Grid Using Adodc Control Doesn't Display Sorted Record Why?
Please Help me any coding suggestions...I have a datagrid using AdodcControl as a datasource cant display sorted record but instead the record is jumbled every time I load the form...I have tried using an SQL statement with Order BY [FIELD] ASC but still it wont work...Please can somebody help me about this problem...Thanks...

ADO Data Control With Mixed Ice-cream : A Simple SQL Statement
Hi there! Again, I've an ADO Data Control on my form.
The thing now is : how do I write an SQL query that lists all the names in my database that meets the criteria specified by the user?

Iit's hard to put all these down into words......so to illustrate the problem, I created a very very very simple project that demostrates my problem.
There's only 9 short lines of simple code in my project.

I really hope you can download this small project and help me!
All I wanna do is to list those records whose Name field contains part of the text the user wanna search for! Thanks a lot!

I've attached the project to this thread.(only 9.28 KB)
Please and thanks!

ADO Data Control && Simple Data Control In VB6.0
What's the real differences between use Adodc activeX control for database and simple Data control in VB6.0?
What choice the programmer have to consider relating those controls?

Simple Picture Display . . . I'm Stumped!
I'm trying to do the following.

Given a picture (.jpg, .bmp, .gif) of any reasonable size, display this picture on a form dedicated to it. But I want the form to assume the size of the picture.

I've tried this with the picture on the Form, in a PictureBox on the Form, and in an ImageBox on the Form. I've tried to resize the form to fit the pic by direct .Height and .Width commands, and also .ScaleHeight and .ScaleWidth. I've tried to size the form to the pic in the .Load, .Activate and .Resize routines, tried .AutoRedraw and .Stretch.

Either I get a reduced picture, a tiny corner of the picture, or it appears full-size, but on a form that's about 50% wider and/or taller than it has to be.

It's driving me crazy. Crazier. This can't be that unusual a request. Can someone point me to an example, or suggest a strategy?

Read In And Display Simple Geometry
Hi,

I want to write a little app that is in a window, and I can simply read in some geometry from an input file and display it. For example, the file might contain a record that contains the nodes of a tetra element, and I can draw the element if I know the order of the nodes.

The shapes that I need to be able to display are:
1. Simple line
2. Quadrilateral, triangle
3. Hexa, Tetra, Penta

First, I dont know if DirectX in VB would be any good for this, or if I should just use Open GL or something (since I have never used either before).

Second, if someone can direct me to a very simple example of this, I would be very grateful.

Any advice greatly appreciated! Cheers.

I should mention, later this year I plan to adapt all my code to VB.NET, so something that would transfer easily would be ideal. * * * **, not looking forward to that,

Cheers.

DirectX Simple BMP Display Problem.
I'm new in direct X programming but i'm pretty advanced in VB.
I've created a simple direct x application to display a bitmap.

(I followed tutorials from:
http://www.rookscape.com/vbgaming/tutH.php

and i've also used this example for developing my app:
http://www.rookscape.com/vbgaming/DirectX.zip )

I made my app and it doesnt work. I know that the engine is done properly but it doesnt display my bitmap. That's my app:

http://www.3magine.ca/vb/dx.zip




I tried everything and i still have no clue what's the problem


HELP PLEASE !!!

Thx.

How To Display A Simple Picture Onto My Program
I tried ways and means to get my picture showing.. but it just says, picture not found.
I recently looked at the www.devbuzz.com tictactoe program, it uses .bmp as pictures.

How do I simply just show a picture on my evb program?

Thanks alot for your help, friends.





Programmers are the laziest people around.

I Know This Is Just Simple For U; How Can I Display The Current Date To My Textbox
i just want to automatically display the current date to my textbox in my vb form.but how? I dont know how to use the date()

A Field From Table (ADO) Display In A (simple) Combobox
i have here a form which supposedly will display the Password of a Computer on a label - as the user select a specific ComputerName from the Combobox by clicking a button,

how can i entirely get the records of the field(ComputerName), to display in a (Simple)Combobox (cmbComputerName).

as i have connect the ADO to the (simple)Combobox, the number of recs it can only display at a time is only one. How can i make the combobox display all of it at the same time.

table(DtaEntries)
fields(ComputerName, NPassword)
Combo1(cboComputerName)
Command1(cmdView)
label(lblPassword)

Use DataGrid To Display Simple Excel Table?
Hi everyone,

(does this apply to this forum??)

I'm starting to use VB.NET i figured it wouldn't be such a bad transition after all the VBA in Excel and a some in Access i've been doing.  But i'm getting stuck with all these components available.

Two questions:

1)  To display a simple table in excel, one where there is a header on the top (2 headers actually) and the first column is filled with 1,2,3,4,5 numbers that I do not want to let the user change.  Other than the top 2 rows and first column the rest of the table i'd like to let the user edit.  Is datagrid the component to use?  I was also looking at this "SourceGrid: C# grid control" from http://www.devage.com/  which seems cool.  I can use a C# control in VB.net right?

2) I want to be able to display 3 tables in a tab control panel.  Except, i'd like to have the title of each shown and a little expand button to the left of each so when i click expand the rest of the table will show and the rest of the tables will be pushed down.  (same kind of tables as listed above)  What is the easiest way to achieve this? is there another control for this kind of thing or will I have to program some event triggers to show the table and change the height properties appropriately of the other tables?  There would be a few cases to take care of if that was the only way :<

Any help would be great!! Thank you.

Frank

Simple Simple Data Environment Question
This is my first time using the Data Environment

All I would like to do is instead of right clicking connection1 and going down to properties, and establishing a connection through there to my database.

I would like to write the code out so that I will be able to use app.path command

My purpose fo doing this is so that no matter where my project is it will never have problems finding the database.

Thanks
PinkPanther2070

How Can I Make A Simple CGI File To Display A Date Or IP Or Anything On My Webpage!
I run several webservers, but im not happy with IIS 5.0 as it doesn't work very well..
I like the asp functions it has, but it doesnt support virtual servers (several domain names pointing to different "web" folders on my webserver..

But i like the ASP functions it has...
I was wondering if someone can show me how to make a siple CGI exe file which will put the date/time/year on the page that requests it..

Like this:
if i have a CGI.exe which is named DATE.exe , i could have an INDEX.HTML page which contains a code like
<html<<body> <cgi run=DATE.EXE> </body></html>

and which would display the current date/time/year on my server..

I just need a simple exaple on how to make an exe file which could be used like this..

Need to learn how to get info from an exe file and implement it into my site..

Can anyone please provide an SIMPLE,working example.. so that i can learn from..and work with...

PLEASE !!!
--AlexData--

( if answer="maybe" then I'LL GIVE IT A TRY = true... )
( on GIVE IT A TRY then "write simple example )

I Need Help With Data Grids (display, Add, Update && Delete) Data.
Hello pepz!

Let say, I have 4 inputted values txtFname(“First Name”), txtLname(“Last Name”), txtAge, and txtAdrs(“Address”). Of course this values are going to be save to database.

So, how am I going to display,(add), update & delete from/ to data grid.

Hope you guys understand what I mean.

Tanx in advanced

I Want To Display Data With Data Grid Object
hi evrry one
i am new in vb programming
and i want to display data from a database by the use of the datagrid object

i am able to get the data and display it in a combobox
but not with the data grid

to be more clear

in combo box
it was like this
----------->
...
..
.
Dim i
i = 0
While Not rs.EOF
Combo1.AddItem rs("ad_id"), i

rs.MoveNext
i = i + 1
Wend
...
..
.
<---------
how can i get the same data but in the datagrid


thanx in advance[color=blue][color=blue][color=blue]

Data Report Doesnt Display Data .....................why
i create a datareport with dataenvironment with criteria. This is my command in data environment1

SELECT d .receivedt, h.invs_no, h.supplier, SUM(d .subtotal), h.received, h.po_no, d .brand, d .rcvdqty, d .package, d .batchno, d .expdate, d .subtotal FROM receiveddel d, receivedhdr h WHERE (h.invs_no = ?) GROUP BY h.supplier, d .receivedt, h.invs_no, d .subtotal, h.received, h.po_no, d .brand, d .rcvdqty, d .package, d .batchno, d .expdate ORDER BY h.supplier


and i have another form for me to pass the invs_no to the command


If txtCustomer.Text <> "" Then
    DataEnvironment1.rssql Trim(txtCustomer.Text)
    DataReport1.Show
Else
    MsgBox "Please enter a valid customer ID", vbInformation
End If

actually everything works well no error come out but the data report doesnt display anything..........is a blank report but my database does contain data what can i do please help me

Data Report/Data Environment Won't Display Last Row.
Hi, I have had this problem before and another vbcity user has also asked this question, but I can't find their question and mine wasn't answered so here it is.

If my table has 2 rows, only 1 is displayed. If the table only has 1 row, nothing is displayed. ie my last row is never displayed. Any ideas? It works fine in access. Every row shows up.

Thanks in advance.

thanks
leadfinger
http://www3.nbnet.nb.ca/gspil

How To Connect Microsoft Data Grid Control To Data Control?
Hi all

I am using VB6 and I want to connect Microsoft DataGrid control 6.0(OLEDB) to a data control on the form. I placed the datacontrol on the form and set the data source property to the desired database file, then placed the DataGrid control. Then if click on the data source property of the DataGrid i get the following message box with the following message:

"No compatible data source was found for this control. Please add an OLEDB data source such as the Data Environment or Microsoft ADO Data Control to the form or project"

What is the problem? I want to use the DataGrod itself. Any body help?

How To Display Data In A Data Report
hai, i have a table called attendance which contains Student ID, Date and Attendance as its fields. I want to display the record with particular date on the data report. How can i do this, please help me in this regard. Thank You.

Display Data And Edit Data
Hi,
I want to display data from one of the table to the user with some control. The user should be given option to modify the data.And the major thing is that the length and data type of the data entered should match the table structure.What control will be best one.Batch update Option should be there.
I am using SQL Server 2000 as back end.

Best Way To Display Data...?
Hi,

I have a text file that looks something like this:

Arsenal
2; 3; 6; 7; 10; 11; 14; 15; 34; 35; 38; 39; 42; 43; 46; 47;
Leeds
2; 3; 6; 7; 10; 11; 14; 15; 50; 51; 54; 55; 58; 59; 62; 63
etc...

The numbers are representative of the slots that the teams are available to play in.

So for example, if Leeds were playing Arsenal, I would need to identify the available slots for Leeds, and then Arsenal, and if they were the same, this should leave me with a narrowed down list of slots to choose from, once the non-duplicated slots were removed. Make sense?

What would be the best way to achieve this? I want to make it as easy as possible to compare the slots. The code that I have which produces the text file above is as shown below:


Code:
Print rs("Team") 'Contains team name
If rs("Monday").Value = "Available" Then
Print #1, rs("Team"), 2; 3; 6; 7; 10; 11; 14; 15; 'slots representing monday
End If
If rs("Tuesday").Value = "Available" Then
Print #1, rs("Team"), 18; 19; 22; 23; 26; 27; 30; 31;
End If
If rs("Wednesday").Value = "Available" Then
Print #1, rs("Team"), 34; 35; 38; 39; 42; 43; 46; 47;
End If
If rs("Thursday").Value = "Available" Then
Print #1, rs("Team"), 50; 51; 54; 55; 58; 59; 62; 63
End If
Thank you for your input, I would welcome any suggestions!

MiniMe

Display Data
Hi All,

I want to make a screen wherein the user can add,delete,modify and view data......(Master tables)

i have made the necessary labels,textboxes and cmd butttons for this purpose. Suppose the user types in a textbox the value of a primary key of the table and clicks on the display button i want to the records for that particular primary key value to appear on the screen..........


for this i cud possibly do is write a connection to the database ....write a select ------ from ** where value is primary key value....(ie i have to hardcode it)

this is my doubt .......what if there is an extra column added to the table later.....then my select query wudnt give me the value of the last column.....even if i write select * i wudnt be able to display it on screen.......

for this i guess i create textboxes and labels on the fly ...but the how do i assign names to the labels on screen (from the database)????

i wud like to know if this is a valid doubt...if yes how do i go abt it...pls do say if there is a better way to do it...

Thanx,
Tina.

How Can I Display My Data?
I have an access database and I can search it, the results display in a listbox. What I want to do is be able to click on one of the results in the listbox and have the data display again in the text boxes. So then I would be able to make changes to the data and update the record? but I need help! how can I do this?

Display Data! Help Please
well I am able to display my data, what I have is an access database and out of it I display data such as names and address and such. When I view the data through a listbox it isnt big enough to display all fields? Can I make it scrool or anything? also is there a way to clean it up so all data is displayed in the same way, basically so that it looks organized when I view more than one person at a time? help would be great, hope it makes sense?

Data Display
Hey there,
I am very new to VB and have what is probably a stupid question. I have a Access 2002 DB file, and I am using it to store inventory items. What I need to have happen is for the itemtype to be displayed in a list that can be clicked on and then edited. Now, I have no idea if this is even possible, let alone if it is a smart thing to do, but this program needs to be able to be used by a little old blue haird lady, so I was hoping to have a one form for her to select the item, click an edit button and kick her to another form with the text boxes for her to edit the fields.
Does this make sense? Let me know
Thanks

Display Data In VB
Hi.

I have a .txt file which stores a long list of data, and I would like to display it all on VB in one form. Would you please tell me how to do it? I'm thinking of using DataGrid to do this, but i have very limit knowledge on using DataGrid....

Thanks a lot!

Jacob

How To Display Data
Hi,

I am Beginner to programming, i need ur help.so please help me regarding my issue,i have one screen in which there are 21 textboxes i have divided text in different different Category in frames,(Like "User-information",Contact type etc), also i created tables in SQL server and setup the keys for tables.my question is i would like to display searched user's all information in other textboxs or other form. i tried to find user in data base and i did but i am enable to display all user information.


PHP Code:





 Dim NameFound As Boolean
    Set cn = New ADODB.Connection
    sqlqry = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=PersonInformation;Initial Catalog=RocInformation"
    cn.Open sqlqry
    
    
    Set rs = New ADODB.Recordset
    sqlqry = "PersonInformation"
    rs.Open sqlqry, cn, adOpenKeyset, adLockOptimistic, adCmdTable
   
   
    Do While rs.BOF = False
    
        If txtFirstName.Text = rs!Firstname Then
            MsgBox "Name Found"
            Exit Sub
        Else
            rs.MoveNext
        
        End If
    
        If rs.EOF = True Then
            MsgBox "Name Not Found"
            Exit Sub
        End If
    Loop
End Sub 

Vb6 Data Display
How can I use an array as a datasource for a datagrid control?

Display Data
With a click in a treeview the records populate a datagrid. Each record has 3 fields; an ID, Title and length. When a record is clicked in the datagrid three
text boxes are filled with the data for editing. There are 2 areas of concern:

1. When the datagrid is clicked the first time the first record is the one that shows up in the textboxes. If the record is clicked twice the correct record is displayed in the textboxes.

2. If the record has an apostrophe, a BOF/EOF error msg appears even though there is a replace statement.

My code for the datagrid:
CODEDim sName As String
    sName = datagrid1.Text
    sName = Replace(datagrid1.Text, "'", "")
    sSql = "SELECT TrackID, Title, Length FROM tblTracks WHERE Title = '" & sName & "'"
    If rst.State = adStateOpen Then rst.Close
    rst.Open sSql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
    txtTrack.Text = rst.Fields("TrackID").Value & ""
    txtTitle.Text = rst.Fields("Title").Value & ""
    txtLength.Text = rst.Fields("Length").Value & ""


Display Data From .mdf Using VB.NET
Hello,

    I'm really new at this and I'm trying to learn, but here is what I'm trying to do:  Let's say that on my PC is a file called snacks.mdf.  I'm trying to use VB.NET to display all of the data in snacks.mdf into a display grid.  Then, if the user wants to add, modify, or delete any records, I have an update button on the form that will save the changes, if there are any.  I'm absolutely clueless about even starting this project.  Can someone post some sample code and instructions for me?  I really appreciate it!

Thank you,

Jay

Data Display
HI,

I see. Thanks.
I got one issue. please refer to the attachment red oval portion. Actually i would like to load the main form which text field is empty. But subform i would like to remain the row and text field is empty. Can i know how to do it.

Thanks

regards,
Prisilia

What Would Be The Best Way To Display This Data?
Hi,

I have a text file that looks something like this:

Arsenal
2; 3; 6; 7; 10; 11; 14; 15; 34; 35; 38; 39; 42; 43; 46; 47;
Leeds
2; 3; 6; 7; 10; 11; 14; 15; 50; 51; 54; 55; 58; 59; 62; 63
etc...

The numbers are representative of the slots that the teams are available to play in.

So for example, if Leeds were playing Arsenal, I would need to identify the available slots for Leeds, and then Arsenal, and if they were the same, this should leave me with a narrowed down list of slots to choose from, once the non-duplicated slots were removed. Make sense?

What would be the best way to achieve this? I want to make it as easy as possible to compare the slots. The code that I have which produces the text file above is as shown below:

Code:
      Print rs("Team") 'Contains team name
   If rs("Monday").Value = "Available" Then
      Print #1, rs("Team"), 2; 3; 6; 7; 10; 11; 14; 15; 'slots representing monday
   End If
   If rs("Tuesday").Value = "Available" Then
     Print #1, rs("Team"), 18; 19; 22; 23; 26; 27; 30; 31;
   End If
   If rs("Wednesday").Value = "Available" Then
     Print #1, rs("Team"), 34; 35; 38; 39; 42; 43; 46; 47;
   End If
   If rs("Thursday").Value = "Available" Then
     Print #1, rs("Team"), 50; 51; 54; 55; 58; 59; 62; 63
   End If

Thank you for your input, I would welcome any suggestions!

David

Control The Display
I have a calculator,
my display is lbldisplay.Caption
I want to control the output on the screen so it could only show ten digits only.
E.g

1234567890
no longer than that
its one line of code.
but what is it?

Display Over A Control
Good morning,
How can I implement a micro help on the control? Say: user click on a control or move the mouse over a control and a help message occur to explain what that control is for.

Thank you for your help,

ConKi

Display Bitmap Data
I am trying to print out the deciamal values of a bitmap data file
(any size, any bitdepth).

For a 3 pixel X 2 pixel bitmap image (bitdepth=24), 24 bytes are required to store the image data.

Code:
1 2 3
2 c4 c2 c3
1 c1 c2 c4
I am trying to print out the data in the following format, but for the life of me,
can't get this to work.

Anyone have any ideas?

Code:
1 (1,1)r = xxx
2 g = xxx
3 b = xxx
4 (1,2)r = xxx
5 g = xxx
6 b = xxx
7 (1,3)r = xxx
8 g = xxx
9 b = xxx
10 pdg 1 = 0
11 2 = 0
12 3 = 0
13 (2,1)r = xxx
14 g = xxx
15 b = xxx
16 (2,2)r = xxx
17 g = xxx
18 b = xxx
19 (2,3)r = xxx
20 g = xxx
21 b = xxx
22 pdg 1 = 0
23 2 = 0
24 3 = 0

Display Data From Smartcard
i need help regarding the smart card...i using acr30 usb card reader and smart card SLE4442.

i do something 55% of the small application but i fail on to display the data in the smart card...

can you help me?

Panasonic PBX Data Display
HI Friends,

I have one Panasonic PBX i want to connect it through my PC so i can save tha data in MS Access through Visual Basic programm.
Is it possible? if anyone have the idea please share with me i am also new in visual basic.

Thank You
Abdul lateef Khaleel
Nepal

How To Display Received Data (value)
Hi there, I’m new in vb6, i just wrote my first codes for my project in vb6. What I’m trying to do is to receive data from my micro controller and display it on label box.the problem is that I don’t know how to display the data I’m receiving on a label box. i have manage to open the serial port using the codes below but the codes under the “mscomm commend” seems not to work, all I’m get is “0” on label box. pls see my codes below .thank you

Private Sub Command1_Click()
If Command1 = True Then
Label2 = "state: connected"
End If

' 2400 Baud, No Parity, 8 Data Bits, 1 Stop Bit
MSComm1.Settings = "9600,N,8,1"

' Fire Rx Event Every Two Bytes
MSComm1.RThreshold = 2

' When Inputting Data, Input 0 Bytes at a time
'read everything in input buffer
MSComm1.InputLen = 0

' Open COM1
MSComm1.CommPort = 1
MSComm1.PortOpen = True

Private Sub MSComm1_OnComm()

Dim totalvalue As Integer
Dim sData As String ' Holds our incoming data
Dim lHighByte As Long ' Holds values

'these codes below seems not to work.

' If comEvReceive Event then get data and display
If MSComm1.CommEvent = comEvReceive Then

sData = MSComm1.Input ' Get data
lHighByte = Asc(Mid$(sData, 1, 8)) ' get byte

'display data
Label7 = lHighByte

End If
End Sub

Copyright © 2005-08 www.BigResource.com, All rights reserved