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
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]
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.
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.
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.
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.
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.
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 ;)
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