REALLY FRUSTRATED. PLEASE HELP 
Author Message
 REALLY FRUSTRATED. PLEASE HELP

I am stumped.  When the program drops into Navigate **LISTED BELOW***
when it calls one of the functions listed inside i get TYPE MISMATCH
error.  adoUtilityRs is open and the functions being called are of the
same type. The functions listed in Navigate are list as Public in a
seprate module

Public adoUtilityRs As ADODB.Recordset

Public Property Let Navigate(Direction As String)
  Select Case Direction
    Case "First"
      cmdFirst_Clickd (adoUtilityRs)
    Case "Last"
      cmdLast_Clickd (adoUtilityRs)
    Case "Previous"
      cmdPrevious_Clickd (adoUtilityRs)
    Case "Next"
      cmdNext_Clickd (adoUtilityRs)
  End Select
End Property

Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
  On Error GoTo GoNextError

  If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
  If adoRecordSetRs.EOF Then
    Beep
     'moved off the end so go back
    adoRecordSetRs.MoveLast
  End If
  'show the current record

  Exit Function
GoNextError:
  MsgBox Err.Description
End Function

Sent via Deja.com
http://www.***.com/



Wed, 02 Jul 2003 06:04:49 GMT
 REALLY FRUSTRATED. PLEASE HELP

I am stumped.  When the program drops into Navigate **LISTED BELOW***
when it calls one of the functions listed inside i get TYPE MISMATCH
error.  adoUtilityRs is open and the functions being called are of the
same type. The functions listed in Navigate are list as Public in a
seprate module

Public adoUtilityRs As ADODB.Recordset

Public Property Let Navigate(Direction As String)
  Select Case Direction
    Case "First"
      cmdFirst_Clickd (adoUtilityRs)
    Case "Last"
      cmdLast_Clickd (adoUtilityRs)
    Case "Previous"
      cmdPrevious_Clickd (adoUtilityRs)
    Case "Next"
      cmdNext_Clickd (adoUtilityRs)
  End Select
End Property

Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
  On Error GoTo GoNextError

  If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
  If adoRecordSetRs.EOF Then
    Beep
     'moved off the end so go back
    adoRecordSetRs.MoveLast
  End If
  'show the current record

  Exit Function
GoNextError:
  MsgBox Err.Description
End Function

Sent via Deja.com
http://www.deja.com/



Wed, 02 Jul 2003 06:05:02 GMT
 REALLY FRUSTRATED. PLEASE HELP
I am stumped.  When the program drops into Navigate **LISTED BELOW***
when it calls one of the functions listed inside i get TYPE MISMATCH
error.  adoUtilityRs is open and the functions being called are of the
same type. The functions listed in Navigate are list as Public in a
seprate module

Public adoUtilityRs As ADODB.Recordset

Public Property Let Navigate(Direction As String)
  Select Case Direction
    Case "First"
      cmdFirst_Clickd (adoUtilityRs)
    Case "Last"
      cmdLast_Clickd (adoUtilityRs)
    Case "Previous"
      cmdPrevious_Clickd (adoUtilityRs)
    Case "Next"
      cmdNext_Clickd (adoUtilityRs)
  End Select
End Property

Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
  On Error GoTo GoNextError

  If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
  If adoRecordSetRs.EOF Then
    Beep
     'moved off the end so go back
    adoRecordSetRs.MoveLast
  End If
  'show the current record

  Exit Function
GoNextError:
  MsgBox Err.Description
End Function

Sent via Deja.com
http://www.deja.com/



Wed, 02 Jul 2003 06:06:53 GMT
 REALLY FRUSTRATED. PLEASE HELP
This must be really getting to you, since you posted 2 replies to your own
question, I almost missed it!

Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
  On Error GoTo GoNextError
  If Not adoRecordSetRs.EOF Then

In the function signature you declare a parameter adoGenRs As
ADODB.Recordset but then you actually use adoRecordSetRs, and in the
function calls, you pass adoUtilityRs "cmdFirst_Clickd (adoUtilityRs)"

#1 Why are you passing a parameter to thecmdNext_Clickd function, since you
are not doing anything with it?
#2 You say that adoUtilityRs is open, but what about adoRecordsetRs ? If it
is "nothing" because it hasnt been instanciated (Set) then it si not a valid
recordset object (and again, why are you passing it?

To me it appears more logical (from the code you posted) to pass the
recordset that requires naviagation

#3 You dont say exactly where the error occurs in your code. Is it in the
call to the function or within the function itself?

HTH

Quote:

> I am stumped.  When the program drops into Navigate **LISTED BELOW***
> when it calls one of the functions listed inside i get TYPE MISMATCH
> error.  adoUtilityRs is open and the functions being called are of the
> same type. The functions listed in Navigate are list as Public in a
> seprate module

> Public adoUtilityRs As ADODB.Recordset

> Public Property Let Navigate(Direction As String)
>   Select Case Direction
>     Case "First"
>       cmdFirst_Clickd (adoUtilityRs)
>     Case "Last"
>       cmdLast_Clickd (adoUtilityRs)
>     Case "Previous"
>       cmdPrevious_Clickd (adoUtilityRs)
>     Case "Next"
>       cmdNext_Clickd (adoUtilityRs)
>   End Select
> End Property

> Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
>   On Error GoTo GoNextError

>   If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
>   If adoRecordSetRs.EOF Then
>     Beep
>      'moved off the end so go back
>     adoRecordSetRs.MoveLast
>   End If
>   'show the current record

>   Exit Function
> GoNextError:
>   MsgBox Err.Description
> End Function

> Sent via Deja.com
> http://www.deja.com/



Wed, 02 Jul 2003 19:25:33 GMT
 REALLY FRUSTRATED. PLEASE HELP
Sorry for being sloppy.  Below the code is fix.  I am getting a type
mismatch on the below code

Public adoUtilityRs As ADODB.Recordset

Quote:

> > Public Property Let Navigate(Direction As String)
> > Select Case Direction
> > Case "First"
> > cmdFirst_Clickd (adoUtilityRs)
> > Case "Last"
> > cmdLast_Clickd (adoUtilityRs)
> > Case "Previous"
> > cmdPrevious_Clickd (adoUtilityRs)
> > Case "Next"
> > cmdNext_Clickd (adoUtilityRs)

**************I get a TYPE MISMATCH when program hits here

Quote:
> > End Select
> > End Property

> > Public Function cmdNext_Clickd(adoRecordSetRs As ADODB.Recordset)
> > On Error GoTo GoNextError

> > If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> > If adoRecordSetRs.EOF Then
> > Beep
> > 'moved off the end so go back
> > adoRecordSetRs.MoveLast
> > End If
> > 'show the current record

> > Exit Function
> > GoNextError:
> > MsgBox Err.Description
> > End Function


- Show quoted text -

Quote:

> This must be really getting to you, since you posted 2 replies to your own
> question, I almost missed it!

> Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> On Error GoTo GoNextError
> If Not adoRecordSetRs.EOF Then

> In the function signature you declare a parameter adoGenRs As
> ADODB.Recordset but then you actually use adoRecordSetRs, and in the
> function calls, you pass adoUtilityRs "cmdFirst_Clickd (adoUtilityRs)"

> #1 Why are you passing a parameter to thecmdNext_Clickd function,
since you
> are not doing anything with it?
> #2 You say that adoUtilityRs is open, but what about adoRecordsetRs ?
If it
> is "nothing" because it hasnt been instanciated (Set) then it si not a
valid
> recordset object (and again, why are you passing it?

> To me it appears more logical (from the code you posted) to pass the
> recordset that requires naviagation

> #3 You dont say exactly where the error occurs in your code. Is it in the
> call to the function or within the function itself?

> HTH


> > I am stumped.  When the program drops into Navigate **LISTED BELOW***
> > when it calls one of the functions listed inside i get TYPE MISMATCH
> > error.  adoUtilityRs is open and the functions being called are of the
> > same type. The functions listed in Navigate are list as Public in a
> > seprate module

> > Public adoUtilityRs As ADODB.Recordset

> > Public Property Let Navigate(Direction As String)
> > Select Case Direction
> > Case "First"
> > cmdFirst_Clickd (adoUtilityRs)
> > Case "Last"
> > cmdLast_Clickd (adoUtilityRs)
> > Case "Previous"
> > cmdPrevious_Clickd (adoUtilityRs)
> > Case "Next"
> > cmdNext_Clickd (adoUtilityRs)
> > End Select
> > End Property

> > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> > On Error GoTo GoNextError

> > If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> > If adoRecordSetRs.EOF Then
> > Beep
> > 'moved off the end so go back
> > adoRecordSetRs.MoveLast
> > End If
> > 'show the current record

> > Exit Function
> > GoNextError:
> > MsgBox Err.Description
> > End Function

> > Sent via Deja.com
> > http://www.deja.com/



- Show quoted text -

Quote:
> This must be really getting to you, since you posted 2 replies to your own
> question, I almost missed it!

> Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
>   On Error GoTo GoNextError
>   If Not adoRecordSetRs.EOF Then

> In the function signature you declare a parameter adoGenRs As
> ADODB.Recordset but then you actually use adoRecordSetRs, and in the
> function calls, you pass adoUtilityRs "cmdFirst_Clickd (adoUtilityRs)"

> #1 Why are you passing a parameter to thecmdNext_Clickd function,
since you
> are not doing anything with it?
> #2 You say that adoUtilityRs is open, but what about adoRecordsetRs ?
If it
> is "nothing" because it hasnt been instanciated (Set) then it si not a
valid
> recordset object (and again, why are you passing it?

> To me it appears more logical (from the code you posted) to pass the
> recordset that requires naviagation

> #3 You dont say exactly where the error occurs in your code. Is it in the
> call to the function or within the function itself?

> HTH


> > I am stumped.  When the program drops into Navigate **LISTED BELOW***
> > when it calls one of the functions listed inside i get TYPE MISMATCH
> > error.  adoUtilityRs is open and the functions being called are of the
> > same type. The functions listed in Navigate are list as Public in a
> > seprate module

> > Public adoUtilityRs As ADODB.Recordset

> > Public Property Let Navigate(Direction As String)
> >   Select Case Direction
> >     Case "First"
> >       cmdFirst_Clickd (adoUtilityRs)
> >     Case "Last"
> >       cmdLast_Clickd (adoUtilityRs)
> >     Case "Previous"
> >       cmdPrevious_Clickd (adoUtilityRs)
> >     Case "Next"
> >       cmdNext_Clickd (adoUtilityRs)
> >   End Select
> > End Property

> > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> >   On Error GoTo GoNextError

> >   If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> >   If adoRecordSetRs.EOF Then
> >     Beep
> >      'moved off the end so go back
> >     adoRecordSetRs.MoveLast
> >   End If
> >   'show the current record

> >   Exit Function
> > GoNextError:
> >   MsgBox Err.Description
> > End Function

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/


Fri, 04 Jul 2003 21:23:45 GMT
 REALLY FRUSTRATED. PLEASE HELP
Take the brackets (parentheses) OFF:
cmdNext_Clickd is not a function, so when you use brackets, vb evaluates the
contents of the brackets, turning your recordset into the default property
of a recordset, which is a fields collection, hence the type mismatch. Your
sub expects a recordset and you are giving it a collection of fields. Not
the same thing! Type mismatch.
So try:

Quote:
> cmdNext_Clickd  adoUtilityRs

It will work.

Nicer questions with quality code get better answers.

Quote:

> Sorry for being sloppy.  Below the code is fix.  I am getting a type
> mismatch on the below code

> Public adoUtilityRs As ADODB.Recordset

> > > Public Property Let Navigate(Direction As String)
> > > Select Case Direction
> > > Case "First"
> > > cmdFirst_Clickd (adoUtilityRs)
> > > Case "Last"
> > > cmdLast_Clickd (adoUtilityRs)
> > > Case "Previous"
> > > cmdPrevious_Clickd (adoUtilityRs)
> > > Case "Next"
> > > cmdNext_Clickd (adoUtilityRs)
> **************I get a TYPE MISMATCH when program hits here
> > > End Select
> > > End Property

> > > Public Function cmdNext_Clickd(adoRecordSetRs As ADODB.Recordset)
> > > On Error GoTo GoNextError

> > > If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> > > If adoRecordSetRs.EOF Then
> > > Beep
> > > 'moved off the end so go back
> > > adoRecordSetRs.MoveLast
> > > End If
> > > 'show the current record

> > > Exit Function
> > > GoNextError:
> > > MsgBox Err.Description
> > > End Function



> > This must be really getting to you, since you posted 2 replies to your
own
> > question, I almost missed it!

> > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> > On Error GoTo GoNextError
> > If Not adoRecordSetRs.EOF Then

> > In the function signature you declare a parameter adoGenRs As
> > ADODB.Recordset but then you actually use adoRecordSetRs, and in the
> > function calls, you pass adoUtilityRs "cmdFirst_Clickd (adoUtilityRs)"

> > #1 Why are you passing a parameter to thecmdNext_Clickd function,
> since you
> > are not doing anything with it?
> > #2 You say that adoUtilityRs is open, but what about adoRecordsetRs ?
> If it
> > is "nothing" because it hasnt been instanciated (Set) then it si not a
> valid
> > recordset object (and again, why are you passing it?

> > To me it appears more logical (from the code you posted) to pass the
> > recordset that requires naviagation

> > #3 You dont say exactly where the error occurs in your code. Is it in
the
> > call to the function or within the function itself?

> > HTH




- Show quoted text -

Quote:
> > > I am stumped.  When the program drops into Navigate **LISTED BELOW***
> > > when it calls one of the functions listed inside i get TYPE MISMATCH
> > > error.  adoUtilityRs is open and the functions being called are of the
> > > same type. The functions listed in Navigate are list as Public in a
> > > seprate module

> > > Public adoUtilityRs As ADODB.Recordset

> > > Public Property Let Navigate(Direction As String)
> > > Select Case Direction
> > > Case "First"
> > > cmdFirst_Clickd (adoUtilityRs)
> > > Case "Last"
> > > cmdLast_Clickd (adoUtilityRs)
> > > Case "Previous"
> > > cmdPrevious_Clickd (adoUtilityRs)
> > > Case "Next"
> > > cmdNext_Clickd (adoUtilityRs)
> > > End Select
> > > End Property

> > > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> > > On Error GoTo GoNextError

> > > If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> > > If adoRecordSetRs.EOF Then
> > > Beep
> > > 'moved off the end so go back
> > > adoRecordSetRs.MoveLast
> > > End If
> > > 'show the current record

> > > Exit Function
> > > GoNextError:
> > > MsgBox Err.Description
> > > End Function

> > > Sent via Deja.com
> > > http://www.deja.com/



> > This must be really getting to you, since you posted 2 replies to your
own
> > question, I almost missed it!

> > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> >   On Error GoTo GoNextError
> >   If Not adoRecordSetRs.EOF Then

> > In the function signature you declare a parameter adoGenRs As
> > ADODB.Recordset but then you actually use adoRecordSetRs, and in the
> > function calls, you pass adoUtilityRs "cmdFirst_Clickd (adoUtilityRs)"

> > #1 Why are you passing a parameter to thecmdNext_Clickd function,
> since you
> > are not doing anything with it?
> > #2 You say that adoUtilityRs is open, but what about adoRecordsetRs ?
> If it
> > is "nothing" because it hasnt been instanciated (Set) then it si not a
> valid
> > recordset object (and again, why are you passing it?

> > To me it appears more logical (from the code you posted) to pass the
> > recordset that requires naviagation

> > #3 You dont say exactly where the error occurs in your code. Is it in
the
> > call to the function or within the function itself?

> > HTH




- Show quoted text -

Quote:
> > > I am stumped.  When the program drops into Navigate **LISTED BELOW***
> > > when it calls one of the functions listed inside i get TYPE MISMATCH
> > > error.  adoUtilityRs is open and the functions being called are of the
> > > same type. The functions listed in Navigate are list as Public in a
> > > seprate module

> > > Public adoUtilityRs As ADODB.Recordset

> > > Public Property Let Navigate(Direction As String)
> > >   Select Case Direction
> > >     Case "First"
> > >       cmdFirst_Clickd (adoUtilityRs)
> > >     Case "Last"
> > >       cmdLast_Clickd (adoUtilityRs)
> > >     Case "Previous"
> > >       cmdPrevious_Clickd (adoUtilityRs)
> > >     Case "Next"
> > >       cmdNext_Clickd (adoUtilityRs)
> > >   End Select
> > > End Property

> > > Public Function cmdNext_Clickd(adoGenRs As ADODB.Recordset)
> > >   On Error GoTo GoNextError

> > >   If Not adoRecordSetRs.EOF Then adoRecordSetRs.MoveNext
> > >   If adoRecordSetRs.EOF Then
> > >     Beep
> > >      'moved off the end so go back
> > >     adoRecordSetRs.MoveLast
> > >   End If
> > >   'show the current record

> > >   Exit Function
> > > GoNextError:
> > >   MsgBox Err.Description
> > > End Function

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/



Sat, 05 Jul 2003 03:18:20 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. A really simple jdbc question - please, please help

2. Really Frustrating Insall Problems

3. Tired...Frustrated..Confused...Please Help

4. Hrmm, dont know if this is right but it sure has me frustrated, Help Please

5. Cross-Server query - really need your help please

6. Please, I Really Need Help: Sending Mail from SQL Server

7. Really Easy Newbie Question - Please Help!

8. really strange! please help

9. Help please - MMC display font gone really small

10. Please Help I'm really stuck! TIA

11. Really slow fact table load---Please help


 
Powered by phpBB® Forum Software