access database to vb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonjon sanchez
    New Member
    • Aug 2007
    • 3

    #1

    access database to vb

    Hi all

    Please help me to my problem, I built a vb application that i used on my projects.

    my problem encounter is on access database from visual basic.
    i have a code of

    'search userID to see if it exists

    [CODE=vb]
    Data1.Recordset .MoveFirst
    usercode = Data1.Recordset .Fields("UserID ").Value
    Do Until found Or Data1.Recordset .EOF
    usercode = Data1.Recordset .Fields("UserID ").Value
    If usercode = txtUserName.Tex t Then
    found = True
    user_name = usercode
    'MsgBox user_id

    Exit Do
    Else
    Data1.Recordset .MoveNext
    End If
    Loop

    [/CODE]
    I have a error on the code "data1.recordse t.movefirst"
    error "object variable or with block variable not set"

    Please help me

    Thanks
    Jonjon
    Last edited by Dököll; Aug 24 '07, 03:54 AM. Reason: Code Tags
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by jonjon sanchez
    I have a error on the code "data1.recordse t.movefirst"
    error "object variable or with block variable not set"

    Please help me

    Thanks
    Jonjon
    Greetings, jonjon sanchez!

    I would have searched a bit for ya, been a long day, Sorry! Do give search box a whirl, add you title there. Be prepared to really look for it, I am sure you'll find some hits.

    Good luck and welcome!
    Last edited by Dököll; Aug 24 '07, 03:56 AM. Reason: Deleted text

    Comment

    Working...