2 Replies - 4159 Views - Last Post: 17 May 2012 - 06:13 AM Rate Topic: -----

#1 JJ-vb6  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-May 12

getting "User-Defined type not defined" error in a line with S

Posted 17 May 2012 - 01:16 AM

Problem:

I'm having an error message saying "User-Defined Type Not Defined" in the first line of code below;
By the way I'm sure it's the SSDBGRID part that's causing it because I've already tried running the system without it and it pushed through. The problem is I need it in there.

 Public Function CheckDuplicate(ByRef frm As Form, ByRef strgrd As SSDBGrid, ByVal intcol As Integer, gval As String) As Boolean
Dim ctr  As Integer
CheckDuplicate = False
With strgrd
    If .Rows <> 0 Then
        .MoveFirst
        For ctr = 1 To .Rows
           If gval = Trim$(.Columns(intcol).Text) Then
              CheckDuplicate = True
              Call MsgBox("Record already included in the list.", vbInformation)
              Exit Function
           End If
           .MoveNext
        Next
    End If
End With
End Function 


I already have Sheridan SSDBGRID Installed.
I'm not sure if I just missed a reference so I attached the list of Project > References .
I also attached the error message.


I'm using VB6 with service pack 6 running on Windows 7 Ultimate 32bit.

Does anyone have any suggestion on how to solve this?
Does anyone have any solution for this?
:smile2:

Attached image(s)

  • Attached Image
  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: getting "User-Defined type not defined" error in a line with S

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 299
  • View blog
  • Posts: 1,755
  • Joined: 26-March 09

Re: getting "User-Defined type not defined" error in a line with S

Posted 17 May 2012 - 02:49 AM

I think you might have answered your own question.

Do you actually have the reference to SSDBGrid in there as I can't see one in the list?
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,979
  • Joined: 19-May 09

Re: getting "User-Defined type not defined" error in a line with S

Posted 17 May 2012 - 06:13 AM

Nope, you don't. Sheridan SSDBGrid is a control. You need to select it from a different list! Go to Project/Components and you should see it there if you have it installed. Once you set a reference to it, you should see it show up in your toolbox.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1