473,224 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

how to display data from current time to before current time

Hi, can anyone help me [how to display data from current time to before current time].
when my program starts there is numbers and time will be display in the form of visual basic. it will run continuesly .My problem here is i dont know how to display the data 5min and before. Besides that i want to store this display for every 5 min and before. i already have database to store the number and time but not for every 5 min.should i create another database that just store data for 5min before. i already have one timer. Can i use another timer. plz help me. plz help with some example of coding
Apr 17 '08 #1
4 1764
debasisdas
8,127 Expert 4TB
Please pass more information.
Apr 17 '08 #2
Please pass more information.
This is my coding. My question here how i do i store information which been display in the Fillflex in to database.
i already has one database. is it ok if i add another one
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     FillFlex
  3.  
  4. End Sub
  5.  
  6. Private Sub FillFlex()
  7. On Error Resume Next
  8. Dim lAvg As Long, iCOunt As Integer
  9. Dim intTime As Date
  10.  
  11.     strSql = "SELECT CarID, TimeIn, TimeOut, TimeDuration, Speed" & _
  12.         " FROM Car_Details" ' WHERE CarTime >=cdate('2008-03-31 7:00')"
  13.  
  14.  
  15.     iCOunt = 0
  16.     FlxRs.Open strSql, DE.Conn, adOpenForwardOnly, adLockReadOnly
  17.     Flex.Rows = 1
  18.     If FlxRs.RecordCount > 0 Then
  19.  
  20.         For i = 1 To FlxRs.RecordCount
  21.             Flex.Rows = Flex.Rows + 1
  22.             Flex.TextMatrix(i, 0) = FlxRs(0)
  23.             Flex.TextMatrix(i, 1) = FlxRs(1)
  24.             Flex.TextMatrix(i, 2) = FlxRs(2)
  25.             Flex.TextMatrix(i, 3) = FlxRs(3)
  26.             If FlxRs(2).Value <> "" Then
  27.                 iCOunt = iCOunt + 1
  28.             End If
  29.             Flex.TextMatrix(i, 4) = FlxRs(4)
  30.  
  31.             FlxRs.MoveNext
  32.  
  33.             lAvg = lAvg + Flex.TextMatrix(i, 4) '= FlxRs(3)
  34.             lAvg = Math.Round(lAvg, 2)
  35.         Next i
  36.         lblNum.Caption = iCOunt
  37.         lblAverage.Caption = lAvg / lblNum
  38.         lblAverage.Caption = Math.Round(lblAverage.Caption, 2)
  39.     Else
  40.         lblNum.Caption = ""
  41.     End If
  42.     FlxRs.Close
  43.  
  44. End Sub
Apr 17 '08 #3
debasisdas
8,127 Expert 4TB
What is the problem with the code ?

is the Where clause is the part of your query ?
Apr 17 '08 #4
What is the problem with the code ?

is the Where clause is the part of your query ?
sorry the problem is not in coding but how i store average speed (u will notice in my coding) to database.
Apr 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Rich | last post by:
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is...
34
by: kroger | last post by:
Hi. I am at a loss to decipher why the javascript on my web page: http://www.psych.nmsu.edu/~jkroger/lab/index.html does not display the date correctly in Firefox. Instead of "2005" for the...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
3
by: matthewemiclea | last post by:
I am trying to display information in Access on a form that takes information from many different queries and puts them together on a spreadsheet or chart. Some specific info: The information I...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
5
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
13
by: G | last post by:
Hello, Looking for opinions on a fairly simple task, new to ASP.net (C#) and want to make sure I do this as efficiently as possible. I have a web based form, and I need to run some SQL before...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.