Results 1 to 5 of 5

Thread: type mismatch

  1. #1
    Join Date
    Dec 2002
    Posts
    10

    Unanswered: type mismatch

    Hi,

    I got a function to fill up the list with the database values like this:


    Public Function FillList(ListItem As ListBox, FieldName As Field,TableName as Table)
    Dim i As Integer
    i = 0
    DbConnect -- procedure to make DSNless connection to DB

    strSQL = "select FieldName from Members"

    'without using the connection object
    ObjRs.Open strSQL, strConn

    ' Add Items in the list box

    ObjRs.MoveFirst
    Do While Not ObjRs.EOF
    ListItem.AddItem ObjRs(0), i
    ObjRs.MoveNext
    i = i + 1
    Loop
    'Be sure you close and destroy your objects.

    ObjRs.Close
    ObjConn.Close
    Set ObjConn = Nothing
    Set ObjRs = Nothing
    End Function


    After that i called the function as:

    Call FillList(List1, "m_email","members")


    It gives me error as "Type Mismatch"

    could you help me?

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Did you check my previous remarks about using strings in place of your objects in the function call ?

  3. #3
    Join Date
    Dec 2002
    Posts
    10
    Hi,

    I checked your previous mail and got my problem sorted out.Actually i started a new thread in dbforums, that's why my query came again,
    thanks very much.

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    You are welcome. Good luck.

  5. #5
    Join Date
    Dec 2002
    Posts
    10

    db grid

    hello, i want to have a parent and many child records inserted into my table , like for a single ORDER , i want to enter many PRODUCTS and its details , how to do this in visual basic?
    ( This is like Master-Details relationship in oracle forms)
    can any one help me?

    cheers
    Lydia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •