Interval Calculator

vipersmind

it can't be!
Local time
Today, 23:00
Joined
Dec 26, 2002
Messages
82
Hi
My form is used to calculate sampling intervals and assign sample numbers based on the depth of the hole drilled
The user enters the following

Code:
HoleID	                [B]HoleID[/B]	     [COLOR=blue]USD04441[/COLOR] 
[I]sample prefix[/I]         [B]Prefix[/B]	     [COLOR=blue]USD04441[/COLOR] 
[I]1st depth[/I]	         [B]Depth From[/B]	     [COLOR=blue]0[/COLOR] 
[I]last depth[/I]	         [B]Depth To[/B]	     [COLOR=blue]20[/COLOR] 
[I]first sampl number[/I]	  [B]First#[/B]	     [COLOR=blue]01[/COLOR] 
[I]sample interval[/I]	  [B]interval[/B]        [COLOR=blue]2[/COLOR]

this should be the outcome
Code:
USD04441	0	2	USD0444101
USD04441	2	4	USD0444102
USD04441	4	6	USD0444103
USD04441	6	8	USD0444104
USD04441	8	10	USD0444105
USD04441	10	12	USD0444106
USD04441	12	14	USD0444107
USD04441	14	16	USD0444108
USD04441	16	18	USD0444109
USD04441	18	20	USD0444110

I am getting a user define type not defined error
the offending form / module is attached can someone have a look at it for me

Please help
 
Last edited:
Make sure the 'Microsoft DAO 3.6 Object Library' is checked in your references.

IMO
 
Yes it is
I have recently changed from Access97 to 2000 and it seems some of the code is no longer supported
 
Have you tried moving it as high up the list as possible (3rd place)?

IMO
 
I moved it from 4th to 3rd the highest it will allow but???
same same no different
 
mmmm, I just tried and got the error 'Object required' and it's highlighting 'rst.Close'

IMO
 
Same. Commented out rst.close (error handler)

Same - Object Required
 
Change your module code to

Code:
On Error GoTo ErrorHandler
    Dim Db As Database
    Dim rst As DAO.Recordset
    
    Dim I As Integer
    
    Set Db = CurrentDb()
 
    Set rst = Db.OpenRecordset("samplecalc")


Doing two things at once here so made need to recheck

Brad
 
Brad,

That worked fine


vipersmind,

Did you get it working?


IMO
 
Last edited:
YES YES YES

You guys are Jets

Thankyou both I have been struggling with this for the longest time

Cheers
Cress:D
 

Users who are viewing this thread

Back
Top Bottom