Timefield in access how can i use it in vb 
Author Message
 Timefield in access how can i use it in vb

Im writing a programme that count how may time i connected whit internet.
When i now the time a can give the prise for that time.
For the Time  0:03:00 is the prices  3BEF I put that in access file

In the access file tijden
I had the tabel tijden Whit two fields
 Record 1
1) BeginTijd  0:00:00
2) Eindtijd 0:03:00
2)  prijs 3BEF
Record 2
1) BeginTijd  0:03:00
2) Eindtijd 0:10:00
2)  prijs 6BEF
How   can i use the access Record 1 in VB

If tijd >Begintijd and <eindtijd then prijs=prijs
prijs.text=prijs



Thu, 21 Mar 2002 03:00:00 GMT  
 Timefield in access how can i use it in vb

Quote:

> Im writing a programme that count how may time i connected whit internet.
> When i now the time a can give the prise for that time.
> For the Time  0:03:00 is the prices  3BEF I put that in access file

> In the access file tijden
> I had the tabel tijden Whit two fields
>  Record 1
> 1) BeginTijd  0:00:00
> 2) Eindtijd 0:03:00
> 2)  prijs 3BEF
> Record 2
> 1) BeginTijd  0:03:00
> 2) Eindtijd 0:10:00
> 2)  prijs 6BEF
> How   can i use the access Record 1 in VB

> If tijd >Begintijd and <eindtijd then prijs=prijs
> prijs.text=prijs

  Maybe I understand.  Please add one more field to your table: prijs

  Record 1
    Field 1) BeginTijd  0:00:00
    Field 2) Eindtijd 0:03:00
    Field 3) prijs 3BEF
  Record 2
    Field 1) BeginTijd  0:03:00
    Field 2) Eindtijd 0:10:00
    Field 3) prijs 6BEF

Here is the code:
----------------------
Dim dbArthur As Database
Dim rsPrijs As DAO.Recordset
Dim strSQL As String

strSQL = "SELECT prijs FROM Wed WHERE " _
  & "Begintijd < #" & tijd & "# AND eindtijd >= #" & tijd & "#"

Set dbArthur = OpenDatabase("C:\FolderName\tijden.mdb")
Set rsPrijs = dbArthur.OpenRecordset(strSQL)
prijs.text = rsPrijs!prijs

rsPrijs.Close
dbArthur.Close

--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"

"What's so funny 'bout peace, love & understanding?"
     - Nick Lowe



Thu, 21 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cans access2.0 engine access btrieve files?

2. line graph in vb (canned routine)

3. 'Canned' data in VB program

4. How do I create a canned form?

5. Canned AcctReceivable Module needed!

6. Canned pages....

7. Crystal Reports Canned Code

8. Canned objects and/or images

9. Switching from inhouse software to canned package.

10. Looking 4 Canned Control

11. Using VB to run an Access 7.0 Make table into Access 2

12. Using SQL To access Access 1.1 Database in VB

 

 
Powered by phpBB® Forum Software