Run Time Error '3265' - Item not found in this collection ?
Hi guys, Really confused right now i have used the following code in my project
Code:
App.TaskVisible = False
Dim db As Database
Dim rs As Recordset
Dim WS As Workspace
Set WS = DBEngine.Workspaces(0)
dbfile = (App.Path & "\donotdelete.mdb")
pwdstring = "passwordhere"
Set db = DBEngine.OpenDatabase(dbfile, False, False, ";PWD=" & pwdstring)
Set rs = db.OpenRecordset("Other", dbOpenTable)
YourUserName.Text = rs("twitteruser")
yourpassword.Text = rs("twitterpass")
and when i run it on my machine it diplays the stuff from the tables twitteruser and twitter pass in the 2 text boxes. How ever my friend installed my app and its giving him the error Run Time Error '3265' - Item not found in this collection ?
the above code is in form load!
Does anyone know why it's doing that?
Thanks , Happy New Year.
Re: Run Time Error '3265' - Item not found in this collection ?
How did you pass your app to your friend? As the app's Exe or via a Setup.exe file? If not as a setup, then do that so that all your project's references can be installed on your friend's pc, as needed.
Re: Run Time Error '3265' - Item not found in this collection ?
Hiya! Yeah i did compile it as a setup .exe file
Thanks
Re: Run Time Error '3265' - Item not found in this collection ?
Please can someone help me with this? I need to release my software soon but this run time error is stopping me.
I know it's only something to do with this part
Code:
YourUserName.Text = rs("twitteruser")
yourpassword.Text = rs("twitterpass")
Because im using the other code for other parts of the project but
YourUserName.Text = rs("twitteruser")
yourpassword.Text = rs("twitterpass")
is whats making them have the run time error
thanks
Re: Run Time Error '3265' - Item not found in this collection ?
Try this:
Code:
YourUserName.Text = rs.Fields("twitteruser")
yourpassword.Text = rs.Fields("twitterpass")
If it is not working, then please post the error details...
Re: Run Time Error '3265' - Item not found in this collection ?
hiya! thanks how ever it says variable not defined and highlights
"yourusername" and "yourpassword" Which are text boxes
thanks!
Re: Run Time Error '3265' - Item not found in this collection ?
Do you have a textbox with that name...?? Check the spelling...
Re: Run Time Error '3265' - Item not found in this collection ?
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
What version of Windows does your friend have? If it is a 64-bit one, you should expect this kind of issue and more - because DAO is far beyond unsupported (it became officially "obsolete" years ago). The solution is to move forward to 1998 (when VB6 was released), and use ADO instead.
Are you sure you gave the correct copy of the database? (check it has a table called Other,with fields called twitteruser and twitterpass)
What did you install in terms of DAO and Jet?