hi,I got few question here. Hope some one can me. plz help me i running out of time
1. how to make my msflexgrid to display data for every 5 min(especially the
number car and average speed.
2. Can the data from msflexgrid store in the database if yes how?
Private Sub Form_Load()
FillFlex
End Sub
Private Sub FillFlex()
On Error Resume Next
Dim lAvg As Long, iCOunt As Integer
Dim intTime As Date
strSql = "SELECT CarID, TimeIn, TimeOut, TimeDuration, Speed" & _
" FROM Car_Details"
iCOunt = 0
FlxRs.Open strSql, DE.Conn, adOpenForwardOnly, adLockReadOnly
Flex.Rows = 1
If FlxRs.RecordCount > 0 Then
For i = 1 To FlxRs.RecordCount
Flex.Rows = Flex.Rows + 1
Flex.TextMatrix(i, 0) = FlxRs(0)
Flex.TextMatrix(i, 1) = FlxRs(1)
Flex.TextMatrix(i, 2) = FlxRs(2)
Flex.TextMatrix(i, 3) = FlxRs(3)
If FlxRs(2).Value <> "" Then
iCOunt = iCOunt + 1
End If
Flex.TextMatrix(i, 4) = FlxRs(4)
FlxRs.MoveNext
lAvg = lAvg + Flex.TextMatrix(i, 4) '= FlxRs(3)
lAvg = Math.Round(lAvg, 2)
Next i
lblNum.Caption = iCOunt
lblAverage.Caption = lAvg / lblNum
lblAverage.Caption = Math.Round(lblAverage.Caption, 2)
Else
lblNum.Caption = ""
End If
FlxRs.Close
End Sub
2 3672
hi,I got few question here. Hope some one can me. plz help me i running out of time
1. how to make my msflexgrid to display data for every 5 min(especially the
number car and average speed.
2. Can the data from msflexgrid store in the database if yes how?
Private Sub Form_Load()
FillFlex
End Sub
Private Sub FillFlex()
On Error Resume Next
Dim lAvg As Long, iCOunt As Integer
Dim intTime As Date
strSql = "SELECT CarID, TimeIn, TimeOut, TimeDuration, Speed" & _
" FROM Car_Details"
iCOunt = 0
FlxRs.Open strSql, DE.Conn, adOpenForwardOnly, adLockReadOnly
Flex.Rows = 1
If FlxRs.RecordCount > 0 Then
For i = 1 To FlxRs.RecordCount
Flex.Rows = Flex.Rows + 1
Flex.TextMatrix(i, 0) = FlxRs(0)
Flex.TextMatrix(i, 1) = FlxRs(1)
Flex.TextMatrix(i, 2) = FlxRs(2)
Flex.TextMatrix(i, 3) = FlxRs(3)
If FlxRs(2).Value <> "" Then
iCOunt = iCOunt + 1
End If
Flex.TextMatrix(i, 4) = FlxRs(4)
FlxRs.MoveNext
lAvg = lAvg + Flex.TextMatrix(i, 4) '= FlxRs(3)
lAvg = Math.Round(lAvg, 2)
Next i
lblNum.Caption = iCOunt
lblAverage.Caption = lAvg / lblNum
lblAverage.Caption = Math.Round(lblAverage.Caption, 2)
Else
lblNum.Caption = ""
End If
FlxRs.Close
End Sub
hi
pliz Use CODE tags around your code:
and try to resend your question or better, why not ues datagrid -
recordset![Fieldname]=datagrid.columns("columnName")
-
hi,I got few question here. Hope some one can me. plz help me i running out of time
1. how to make my msflexgrid to display data for every 5 min(especially the
number car and average speed.
2. Can the data from msflexgrid store in the database if yes how? ...
1. You can use timer control to display data between intervals.
2. Yes, - strVariable = msfGrid.TextMatrix(1, 1)
Point the reason for you code here?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: clwoods |
last post by:
I would like to ask is thier a better way to store data other than access
tables, I would still like to keep access as the front end. My main quest I
suppose is for more speed and maybe security....
|
by: Joey Liang via DotNetMonster.com |
last post by:
Hi all,
I am new to ASP.NET, i have met some problems in binding data from a
table of database to a dropdown list control. Anyone knows how to do it?if
possible can rougly write the codes or any...
|
by: amy |
last post by:
*** Sent via Developersdex http://www.developersdex.com ***
|
by: swas |
last post by:
Hi,
I want to use the MSFlexGrid in Access. For someone who doesn't know VB6 much at all (and just coping with Access...), a couple of questions:
1. Can the MSFlexGrid be bound to an Access form...
|
by: wish |
last post by:
Let say i want the data store at array but not only one record but is many records..
in db i use the for loop and while loop to retrieve the data then i want the data store at the array...then how...
| |
by: jasjas |
last post by:
my Q is like this, i let user to enter a number, then i wanna checking this number from database .
for eg: user enter "12" then i wanna pass to validate which in my database, in my database table...
|
by: tamoochin |
last post by:
I have a form that registers the user with my website, the form is in farsi language and must use utf-8 standard.
I can store data in MS Access and also read it back with any problems. the...
|
by: diarehman |
last post by:
hi all
plz help me. i have to store images in database(access at backend) through vb.net. if u have any information plz reply as soon as possible.
thanks
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |