|
-
May 30th, 2002, 08:26 AM
#1
Thread Starter
Hyperactive Member
Can I Do This?
If so how?/What am I doing wrong?
VB Code:
Private Sub FindOrderedVia(ByVal vintValue, ByVal vintUpper As Integer, ByRef ropt() As OptionButton)
On Error GoTo Error_FindOrderedVia
Dim intLoop As Integer
gerrError.PushErrorStack "FindOrderedVia", Me.Name
For intLoop = 0 To vintUpper
If intLoop = vintValue Then
ropt(intLoop) = True
Else
ropt(intLoop) = False
End If
Next intLoop
Exit_FindOrderedVia:
gerrError.PopErrorStack
Exit Sub
Error_FindOrderedVia:
gerrError.ErrorHandler "FindOrderedVia", Me.Name, Err.Number, Err.Description
Resume Exit_FindOrderedVia
End Sub
I get a mismatch error when I use the following to call . . .
VB Code:
Call FindOrderedVia(.Fields("PurOHOrderedVia"), UBound(optordered), optordered)
-
May 30th, 2002, 09:07 AM
#2
what's in (.Fields("PurOHOrderedVia")?
i'm thinking it's the ByRef ropt() As OptionButton that's giving the error
-
May 30th, 2002, 09:08 AM
#3
^:^...ANGEL...^:^
Looks wrong...
Private Sub FindOrderedVia(ByVal vintValue, ByVal vintUpper As Integer, ByRef ropt() As OptionButton)
this is what u have done...
-----------------
when u r calling this obvously you are not passing the first value as u have declared...
value or vintValue seems to be an integer and when you are calling it you are passing some sort of RECORDSET thing...
".Fields("PurOHOrderedVia")"
-------------------------------
Call FindOrderedVia(.Fields("PurOHOrderedVia"), UBound(optordered), optordered)
==============
so, it's very obvious that there is a type mismatch mistake...
But, can't solve it without taking a look at whole thing...
Hope I am helpful...
Cheers.....
-
May 30th, 2002, 09:25 AM
#4
Thread Starter
Hyperactive Member
Erm nope...
.Fields("Blah") is a value in a datatable.....
So no mismatch there . . . .the mismatch is in passing a control array . . .
-
May 30th, 2002, 09:41 AM
#5
Thread Starter
Hyperactive Member
sorry ax . . . missed your reply, but yeah it's in that somewhere. What I originally needed to do was pass a control array into a control array parameter...
Having said that I have worked aqround it now....
Thanks all...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|