Results 1 to 9 of 9

Thread: VB6.0 HELP!!! can' register a new username

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2012
    Posts
    7

    VB6.0 HELP!!! can' register a new username

    gud day!, i have a problem in vb6.0 when i register a new username and password in my programme i get this error run time error '424 'object required heres my code, ,

    Private Sub cmdConfirm_Click()
    Userinfo.Recordset.Fields("username") = textUsername.Text <== when i click debug this part of my codes is highlighted in yellow
    Userinfo.Recordset.Fields("password") = textPassword.Text
    Userinfo.Recordset.Update

    Register.Hide

    newloginform.Show
    End Sub

    any help would be highly appreciated
    sorry for my bad english grammar

  2. #2
    gibra
    Guest

    Re: VB6.0 HELP!!! can' register a new username

    password may be a reserved word (dipend of database in use).
    i.e. if you use Access then you must use [password]

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: VB6.0 HELP!!! can' register a new username

    Object required indicates that you are trying to make use of an object that is not valid in the current scope.
    In this case it would most likely be UserInfo

    Where is UserInfo defined and opened?

    Of course it could be the textbox as well. The code would require a textbox by that exact name be on the form where the code is located.

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: VB6.0 HELP!!! can' register a new username

    My bet it is the name of the 'new' form you are trying to load: newloginform
    Check its name.

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: VB6.0 HELP!!! can' register a new username

    Of course, I never go to Vegas. There are plenty of things to check in there that could cause that error...userinfo, register and newloginform each come to mind, as well as already mentioned names of the textboxes.

  6. #6
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: VB6.0 HELP!!! can' register a new username

    Keep in mind that it is the very first line which is triggering the error so it would indicate that the object referred to in the error is on that line.

    As I said it is most likely the UserIfno object, but could be the recordset object or the textbox object referred to on that line

    Of course there could be other errors in addition but the message is being triggered by one of these.

  7. #7
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: VB6.0 HELP!!! can' register a new username

    Now you see why I don't go to Vegas.....can't read the cards! I didn't see where OP indicated the error occurred. You are correct.

  8. #8
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: VB6.0 HELP!!! can' register a new username

    I never have been much of a gambler myself. I lived 10 minutes from Atlantic City for almost 15 years and went to the Casino a total of 3 times over all came out about $15 in the hole

  9. #9

    Thread Starter
    New Member
    Join Date
    Sep 2012
    Posts
    7

    Re: VB6.0 HELP!!! can' register a new username

    thank yous so much for help and tips guys, , i managed to fix the error thank you for your help, , i changed some name in the properties and add a couples of codes, , i keep in mind the tips you guys gave to me, , problem solved

Posting Permissions

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



Click Here to Expand Forum to Full Width