DDL &"File Not Found&"
I declare Private Declare Function RCStartSDK Lib "RCSDK.dll" (ByRef pVersion As cdVersionInfo, ByVal Opt As Long) As Long
and put the dll in the same folder as the VB app, but I get Runtime error 53: File not found : RCSDK.dll
I've run depends.exe (for the first time) but I can't see any missing dependencies and listed items all look like system dlls ... ADVAPI32.DLL COMCTL32.DLL COMDLG32.DLL GDI32.DLL KERNEL32.DLL MSVCRT.DLL NTDLL.DLL RCSDK.DLL <--- this is the actual dll, should it be here? RPCRT4.DLL SHELL32.DLL SHLWAPI.DLL USER32.DLL VERSION.DLL WINSPOOL.DRV
What am I doing wrong?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
&"File Not Found&" Error Involving Crystal Report Viewer
Hello.
I have a DB2 table loading VB 6 application that on a couple of forms has crystal reports that it is using for viewing reports. I am supposed to change the crystal reports that is bundled with VB 6 to a crystal report viewer which is a .dll and add to a new form and use the existing reports to view them. Which that all went fine until I tried to run the executable. When I try to view the report it just gives me a pop up box that says "File not found" and in the caption of the pop up box has Crystal Report Viewer at the top.
As a side note: The report is located in the same location as the application. When I try this with the crystal report that is bundled with VB 6 is works fine. Also, I have tried and typed the whole path in the Application.OpenReport line and that didn't work either. The variable RptstrFileType is just the name of the report being used and that is getting populated correctly.
Here is the code I am using:
Private Sub Form_Load()
Dim Application As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Set Application = New CRAXDRT.Application
Set Report = Application.OpenReport(App.Path & "" & RptstrFileType & ".rpt")
Me.CRViewer1.ReportSource = Report
Me.CRViewer1.ViewReport
Set Application = Nothing
Set Report = Nothing
End Sub
Thanks in advance for any advice!
&"Run-time Error '53': File Not Found Filename&"
When running an application I am getting "Run-time error '53': File not found DVT".
DVT.dll is the file being referenced. It is in the C:WINDOWSsystem32 directory. However, when I try to register it through the command prompt I also get an error.
My program runs fine on 2 other Win2000 machines. However, when I copy the DVT.dll to my XP machine and try running the program I always get the error message. Since it runs fine on the Win2K machines I don't think there is a problem with the .dll.
Also, I didn't create the .dll, I am simply enhancing a VB program written by the same guy who made the .dll and cannot be contacted. I would greatly appreciate any suggestions....
Vb App Wont Work On 1 Pc, &"file Not Found&" Error
i have a vb 6 app ( not written by me, i inherited the support of it when i started my job). it works on loads of pc's here no problem, but on one particular pc it wont work. im getting this error :
The VB Application identified by the event source logged this Application Rebate Admin: Thread ID: 980 ,Logged:
Error module/procedure: frmMSRebateSystem.mnuRebateStatements_Click().
Description :File not found.
Number: 53.
VB Error Source: RebateAdmin
i have installed the same version of the app as is on all the other pc's so i dont know how the click method could be missing from that module?
any ideas? anyone come across this strange behaviour before?
&"File Not Found&" CDRom Problem In Win98
I developed an Application to autoplay when the user loads the CD. The cd has a main app plus several other .exe on it. The main app is a form with 4 command buttons. Each button calls a shell function that executes the other .exe on the cd. It runs fine on win2000 but gives me a "File not Found" error when tested it on Win98. The error occurs when the user clicks the command buttons that launches my shell call.
I can copy the entire cd into a folder on the win98 machine and run my application just fine.
Here is a sample of my Shell call.
dim strSource as string
strSource = chr(34) & app.path & "whatever.exe" & chr(34)
appID = shell(strSource,3)
This runs fine from the CD in win2000 as stated before but for some reason won't run on CD in win98. I don't think it's my code since it also runs when copied onto the hard drive a ran from there in win98.
To me it seems that the CDRom drive latenicy may be causing the problem. Any suggestions?
Help!!External DLL Reads "error 53 File Not Found"
We are using a DLL that was created by an outside company. Whenever I try to to call a function in the DLL I get "file not found". I have tried placing this file in Winnt/system32, the current path, the path of vb6.exe etc. etc. nothing works. I even tried to register it with regsvr32, which you should not have to do with this, but that didn't work either. I tried putting the full path in the call to the DLL instead of the just file name--didn't work. I called the company who created it and they told me to "reboot the PC a few times" (yeah right). Of course this didn't work either. I have to figure this out soon--anyone else had a problem like this?
&"Run-time Error '53' File Not Found&"
Searched all over the forums for this, but couldn't find anything on it...
I'm developing in VB6 (Downloading the latest SP now to see if this fixes it).
I'm deploying my package with the "Package and Deployment Wizard".
I package it, try installing it... first problem, I get "can't copy file" errors on some .DLLs... even in safe mode with nothing else running. Keep retrying, doesn't work. This is on the common control DLLs, etc. (mscomctl.dll).
The thing is it's packaging up the one that it's trying to copy over, so that's not the problem per se... I can ignore that error and continue...
I go to run my program and it gives me this:
Quote:
Run-time error '53':
File not found
It's not even specifying the file that's not found.
I'm about to apply the service pack... and I think I'm going to create a nice simple basic package and see how that does when packaged...
Will report back when I'm done... until then, any other suggestions?
&"File Not Found&" When Declaring An API Function
Hi All,
I've installed a SDK containing files written in C++. It installed 2 files on my machine: MBProv.dll and MBProv.lib.
I also have the header file in C++ containing the functions signature and all the prototypes.
Since i want to call these functions from VB, I took one function header and declared it in my module:
Public Declare Function MB_ProvIn Lib "MBProv" _
(lnum As Long, szProv As String) As Long
When i call this function (e.g. longVar = MB_ProvIn(1,"x")) i get the error
"File Not Found: MBProv"
Its the first time im trying to do such a thing and im clueless.
Where did I go wrong?
&"File Not Found&", Run-time Error 53
This is starting to bug me, really.
I've searched these forums for 3 days, but found no answer, I've googled 'till my eyes bled but still I haven't found a solution...
In a project I'm currently working on I need the ability to compress files, so I decided to use BZIP2 compression as I've used it before and it works well, so to save some time I simply copied the code from a previous project;
Code:
Private Declare Function z2Compress Lib "libbz2.dll" Alias "BZ2_bzBuffToBuffCompress" (Dest As Any, destLen As Long, Source As Any, ByVal sourceLen As Long, ByVal blockSize100k As Long, ByVal Verbosity As Long, ByVal workFactor As Long) As Long
Now, this DLL-file, libbz2.dll is compiled using VC++ from the latest BZIP2 source (1.0.4), and works just fine in the other project.
However, whenever I attempt to use the "z2Compress" function in this project I get a "Run-time error 53: File not found: libbz2.dll", and this file is located in the same folder as the project files.
It works just fine though, if I statically declare the path to the file:
Code:
Private Declare Function z2Compress Lib "c:my_projectlibbz2.dll" Alias "BZ2_bzBuffToBuffCompress" (Dest As Any, destLen As Long, Source As Any, ByVal sourceLen As Long, ByVal blockSize100k As Long, ByVal Verbosity As Long, ByVal workFactor As Long) As Long
Though that is out of the question, once compiled, this project is not not meant to run from a static path, it's supposed to be able to run from where ever.
I'm losing my mind over this...any ideas on why it can't find the file?
I'd really, REALLY appreciate some help on this.
Run Time Error 53 &"file Not Found&"
I write a code for to take a back-up of database which is as under
[vb]
Private Sub mnuBack_Click()
fso.CopyFile App.Path & "Gocool_database.mdb", "C:", True
MsgBox "Backup Successful", vbInformation, "Operation Complete"
End Sub
[/vb]
it is running successfully in the project but after crating pakaging it show the RunTime error no 53 "file not found"
How can i correct it .
Runtime Error 53: &"file Not Found&"
hi all!!
i was trying to open a file (say a txt file) through shell command on a click of a button.
VB Code:
Private Sub Command1_Click()Dim sPath As StringsPath = "C:Windowsdesktopwas.txt"Shell "notepad.exe" & sPath, vbNormalFocusEnd Sub
But it gives a runtime error 53 "file not found".
but when i omitted the path command and tried to open a new empty notepad, it worked. then wots the problem???
Stop Popup &"File Not Found&" Msg
When I search for files, if the file number I search for does not exist, an error message will popup saying "file not found" and it will close the application. What would be the code to stop the popup message from showing and shutting down the program, and in replacement have a message saying "File Not Found" show up as text in a list box?
Excel And VB Error &" File Not Found&"
Hi all,
i wrote some macros with office 2000 on windows XP.
Macros were simple with some user forms and they all worked well in XP.
then i installed Windows 2000 Operating system with the same office 2000 product and copied the excel sheets. but when i try to open the sheets a VB message box appears and displays "file not found" error and never opens the sheet, even with disable macros choice. no other error message exists neither which file is missing information!.
could someone please point me why i get this error and what could be the possible reason? i may provide the excel sheet if someone wants to reivew.
thanks for your helps in advance.
Emre.
&"File Not Found&" Error
"File not found"
--------------------------------------------------------------------------------
i get this error whan i tray 2 open a file from the Desktop
right mouse button -- > Open with --> my project.exe = "File not found"(microsft)
but when i drag and drap the same file into my Project.exe
it's working fine
i can get what he doing what file he didn't found ?
the file type dont make any defrant the only thin that make a defrant that i c
is if i delete all the code in my project not only the main form
What can i do ? (this error is in XP System not in win 98)
how can i find out what file he didn't found?
im losing it
the problam is in my project and not in win XP
what i dont get is what is the defrant that make this bug
whan i open a file with Drag and drap (on the icon or EXE)
from open the same file with
"Open With" that make this error?
More info:
(((( i delete all the form_load form_unload and Form_Activate...
there is No Code in the Form type
and yet i c the error ("File not found") ))))
48 - File &"User&" Not Found
Hi everybody!
I got a problem with visual basic 6.0 under Windows 98 SE.
take this declaration for example...
Declare Function GetWindow Lib "User" (ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer
Declare Function GetParent Lib "User" (ByVal hWnd As Integer) As Integer
Declare Function GetWindowTextLength Lib "User" (ByVal hWnd As Integer) As Integer
Declare Function GetWindowText Lib "User" (ByVal hWnd As Integer, ByVal lpString As String, ByVal aint As Integer) As Integer
I get a Runtime error 48 - File not found : "User" as soon as the code reaches a call to any of the functions above...
The declaration section should be correct, and anyway I get exactly the same error if I try to run some examples from microsoft MSDN online... some small apps I created months ago stopped running too!
Some of the functions does work if I change User in User32... but getwindowstextlength, for example, does not... along with most other API.
Ah... I don't have any user.dll file in my windows folder (and subfolders...) I don't know If this is normal. I've also tried to reinstall the OS recently but nothing done...
Thanks in Advance!
&"File Not Found&" When Trying To Use A DLL Function
I get a File Not Found error whenever I try to call this function.
I put the DLL file in the same folder as my project, as well as in the System32 folder of Windows.
Why can't VB find the DLL?
VB Code:
Public Declare Function wtxInitialize Lib "wtxapi.dll" (ByRef hWtx As Long) As Long
&"file Not Found&" Error
I have a project in vb that I put on a cd. This cd consists of a visual basic executable file and inside my code it will launch an install exe.(acrobat reader). Well it works on the cd and my hard drive on Windows NT, but on Windows 95 it works on the hard drive but not on the cd. I put an error handler in it and it said "file not found". How is it that it can find it on my cd(windows NT) and windows 95 hard drive, but not in windows 95 on the cd. Hopeing someone can answer this, this is nervewrecking!!
Thanks
&"file Not Found Error&"
I have an exe that is programmed to enter itself in the registry so that whenever the user logs into the machine the exe starts executing. This exe reads data from a text file. whenever the user logs in he gets "file not found" messagebox (the application is in VB) even though the file that it reads from exists. If we kill the process from the task manager and run it again there is no such error. Its only when the user logs in that he gets this error. The process has to be killed and restarted for it to work. Please advice...thanks in advance
&"File Not Found&"
i get this error whan i tray 2 open a file from the Desktop
right mouse button -- > Open with --> my project.exe = "File not found"(microsft)
but when i drag and drap the same file into my Project.exe
it's working fine
i can get what he doing what file he didn't found ?
the file type dont make any defrant the only thin that make a defrant that i c
is if i delete all the code in my project not only the main form
What can i do ? (this error is in XP System not in win 98)
how can i find out what file he didn't found?
im losing it Help me please
&"File Not Found.&"
Hi,
What is the best way I could use to make a .txt file?
All I want to do is write to the file using -
Open Filename for Output as #1
...
Close #1
Thanks,
~ADW~
How To Reach Each File In A Folder In Order? With &"FileSystemObject&" - &"Files&" Class.
I know that I can reach any file(or filename) by using FileBox control with
Code:
'I can choose any file with its index. The Files are sorted by their names
File1.List(FileIndex)
I want to do the same without using FileBox control, else I tried to reach Files
with
Code:
Dim fso As New FileSystemObject, fil1 As File, fol1 As Folder, fc As Files
Set fc = fso.GetFolder(sFolderPath).Files
MsgBox fc.Count
'Nothing wrong up to here
'but this line gives error
MsgBox fc(1).name
I figured it out that
Code:
Msgbox fc(index) 'is wrong
Msgbox fc(key) 'this is the right one
So what is key here?
And Is it possible to reach each file with in order(as sorted by names)
(ex: I want to access the 6. file or 3. file) with FileSystem Object?
Ofcourse any other ideas will be wellcome.
How To Export An &"image File&" And &"MSFlexGrid&" To A Word Document
I need to output an image file and a table (MSFlexGrid) to WORD, anyone can suggest how to do ?
I use the following to output text fields:
========================================================Private Sub cmdPrtProductionSheet_Click()
Dim objWORD As New Word.Application
Dim objDoc As New Word.Document
Set objDoc = objWORD.Documents.Open("C:PPSheet.doc")
objDoc.FormFields.Item("clientcode").Range = strClientCode
objDoc.FormFields.Item("factorycode").Range = txtFactoryCode
objDoc.FormFields.Item("PPNO").Range = strPPNO
objDoc.FormFields.Item("PDate").Range = strIDate
objDoc.FormFields.Item("EDate").Range = strEDate
objDoc.FormFields.Item("ContactNo").Range = strSONO
objDoc.FormFields.Item("StyleCode").Range = txtPPStyleCode
objDoc.FormFields.Item("BulkQty").Range = txtPPBulkQty
objDoc.FormFields.Item("Quota").Range = txtPPQuota
objDoc.FormFields.Item("description").Range = txtPPStyleName
'objDoc.FormFields.Item("imagefile").Range = LoadPicture(iFile)
objDoc.SaveAs ("C:PPSheet_" & strPPNO & ".doc")
objDoc.Close
Set objDoc = Nothing
Set objWORD = Nothing
End Sub
Thank you in advance
Method &"SaveAs&" Or &"Save&" Of Object &"Excel.Workbook&" Does Not Work.
Hi people.
I did for a long time a program that uses excel automation, so that from a template will create a final file with some data pulled from the database (with ADO). At the end and when the Excel file is ready to be saved I got in a couple of computers some problems. In the whole LAN have XP, but in these 2 computers we have SP2. I have checked the rights and are OK (I have even tried to save the Workbook under the Temp folder and also the same problem).
Working with Office 2003 (SP1).
I have searched in internet about any bugs but I donīt find anything.
Any ideas.
Thanks for your time
Jaime
How To Change Boolean Field From Displaying &"0&" And &"-1&" To &"Yes&" And &"No&"
Hey there,
I have a data report, which displays a few fields from an Access table, one which is a boolean. At the moment if the boolean value is True, then on the data report it displays "-1", and if False "0".
How can I change this so it displays "Yes" if true and "No" if False?
Would be really grateful for any help.
Thanks.
Mouse Input Error &"method Or Data Member Not Found&"
I am trying to get mouse input to work in directx and i keep getting this error "method or data member not found" it is probably something very simple maybe i am passing the function the wrong variable, but then what does it want here is the code
This code is located on the form
'start mouse input
Set mInput = New clsDIMouse8
mInput.Startup dxInput, Form1.hWnd
it references this inside a class module
Public Sub Startup(ByRef di As clsDirectInput8, ByVal hWindow As Long)
'create reference to DirectInput object
Set dinput = di
'create the mouse object
Set diDev_Mouse = dinput.DIObj.CreateDevice("guid_SysMouse")
'configure DirectInputDevice to support the mouse
Call diDev_Mouse.SetCommonDataFormat(DIFORMAT_MOUSE)
Call diDev_Mouse.SetCooperativeLevel(hWindow, _
DISCL_FOREGROUND Or DISCL_EXCLUSIVE)
'acquire the mouse
diDev_Mouse.Acquire
End Sub
Arg - &"Data Source Name Not Found And No Default Driver Specified&". MySQL And VB6
VB Code:
Private Mysql_Connection As New ADODB.ConnectionPrivate rs As New ADODB.Recordset Private Sub Form_Load()On Error Resume NextMysql_Connection.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;UID=ODBC;PWD=413201;"Debug.Print Err.DescriptionEnd Sub
I just downloaded mysql 5.0, installed it and started the service. i want to connect to it.. and create a database
But I get the error
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Ive tried many different connection strings, but all result in the same error.
how can iconnect to mysql and create a database? (and use mysql in general)
Run Time Error 326 &"resource With Identifier Version Not Found&"
A program I made is run from a Novell Network drive (installed locally, but with install directory a mapped network drive).
It works fine
Untill a key user copied the exe to a subdirectory.
eg
K:afolderMyExe.exe
works fine, but when copied to
K:afolderanotherfolderMyExe.exe
it returns a Run Time Error 326 with description "resource with identifier version not found"
I have narrowed it down to the use of App.Major and App.Minor (the program checks it's version with the version of a database it is using).
I suspect that it has to do with network rights (this user is not an admin), but which Novell network rights can prevent a program to read it's own version number? And if the use of App.Major and app.Minor needs specific rights, it sure needs updated documentation.
Another strange thing is, that if you view the properties of the exe (in explorer), the version tab has disappeared, while the original program does display it's version tab.
Any information is welcome.
PS, I know I can hard code the version number, but if it can be solved by changing some rights, I don't have to deploy another version.
Library Not Found For &"UCase$&"??? All I Did Is Email My Project Home On AOL...
I'm having a serious delima here everyone. ok, here is deal. Please help.
I sent my project from my work computer to my home computer threw e-mail(AOL). When I open up the project in VB6 at home and RUN the program VB gives me an ERROR that says "Object or Library not Found!"! What i do not understand is that it HIGHLIGHTS the VB Built-In UCASE statement!
I don't get whats wrong. I checked the projects references and i believe all the needed references are checked.
here is my computer specs...
[ HOME COMPUTER ] [ WORK COMPUTER ]
Window XP Home Edition Windows 98 Second Edition
Athalon 1.6GHZ Pentium III
256MB SDRAM 96MB SDRAM
Data Base "ghost" Path Not Found - Any One Knows Such A Prob?
Hi,
I am writing an app that usses a data base witch is an access mdb file.
When i have changed the database, i made a new file (ver1 and ver2 of the same datavase), both files where in the same directory and evry thing woked fine.
Now, when i deleted the old database file, since i dont use it any how, i get a vb msg that said it cant find that first file - but it hapends just in an end of a function - while there is no use of this path what so ever in the whole project.
Apart from the msg - the app works fine.
Any one knows what this could be?
Thanx
Dani
VB/Crystal Report Error&" Physical Database Not Found&"
Hi all,
I have a VB 6.0 front end application that uses Crystal Report 8.5 and a text file as my database.
I am trying to run this application on a non-developer machine (that doesn't have MS Visual Studio, or Crystal Report).
I have setup the ODBC DSN for the text file (MS Text Driver) on the client PC,and also used Visual Studio Installer to run the VB executable from the client PC.
I placed all the dependent DLL's,MSM's and OCX's on that machine, but I get an error: "PHYSICIAL DATABASE NOT FOUND" although the VB form opens up.The crystal report doesn't open up.
Can someone please help, or let me know what I'm missing?
Thanks.
&"Server Not Found&" Error On Setting Crystal Report Datasource At Runtime.
Hi! Guys
In one of my projects, I'm adding the database to a crystal report design from inside VB through ado & oledb connectivity.
While calling the report I'm setting the datasource of this report to an ADO recordset but it gives runtime error "Server not found". Here is the code:
Option Explicit
Dim Report As New crptMatter
Dim txtobj As CRAXDRT.TextObject
Dim strData As String
Public strTitleId As String
Public strChoice As String
Dim rsTemp As New ADODB.Recordset
Dim rstemp1 As New ADODB.Recordset
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CloseRs rsTemp
If strChoice = "1" Then
rsTemp.Open "select * from Library_Master where Classification_ID_Auto='" & strTitleId & "' ORDER BY TitleCode,Title", conDatabase, adOpenDynamic, adLockOptimistic
ElseIf strChoice = "2" Then
rsTemp.Open "select * from Library_Master where Title_ID_Auto='" & strTitleId & "' ORDER BY TitleCode,Title", conDatabase, adOpenDynamic, adLockOptimistic
End If
If Not (rsTemp.EOF And rsTemp.BOF) Then
rsTemp.MoveFirst
Report.Database.SetDataSource rsTemp
End If
CRViewer1.ReportSource = Report
CRViewer1.Zoom 2
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
strData = ""
Set rsTemp = Nothing
CloseRs rsTemp
End Sub
FileSystemObject Folder.Delete Returns &"Path Not Found&" For Really Long Paths
I have this code which i run with different values for sPath
Code:
Dim oFSO As new Scripting.FileSystemObject
Dim oFolder As Scripting.Folder
Set oFolder = oFSO.GetFolder(sPath)
Call oFolder.Delete(True)
This works well until it ran on several paths...when I get the following error
Error 76, "Path not found"
I have obviously checked and the paths do exist, and i do have permissions to read/delete them
I believe that the command tries to delete the folder, but firsts tries to delete the file under it, and this file has a absolute path which is over 256 characters long, which seams to exceed some limit in windows and prevents me from deleting the folder.
Any Ideas how I can delete the directory (recursively) without getting this problem?
Set DataSource On Usercontrol Returns Error &"Method Or Data Member Not Found&"
Having a problem with custom usercontrol I created.
Binding is accomplished through Tools-->Procedure Attributes. All works well when DataSource and DataField set at design-time, but I cannot assign DataSource on my control in run-time (w/code). Error received = "Method or Data Member not found." - Please Help -
Code:
Set FCTitle.DataSource = DE
'--On error, ".DataSource" portion is highlighted.
FCTitle.DataMember = "Members"
FCTitle.DataField = "TitleID"
DE is DataEnvironment. Same error with DE, adodc, and my custom datasource. FCTitle is my data consuming usercontrol. I would be *SO* greatful to have this issue resolved.
- nlleach
MySQL Connection. &"Data Source Name Not Found&".
I've been trying to connect to a remote MySQL database with this code (the connection string is from CarlProthman's site):
Code:
Option Explicit
Dim DbConn As ADODB.Connection
Dim DbRecSet As ADODB.Recordset
Dim SQL As String
Private Sub Form_Load()
Set DbConn = New ADODB.Connection
Set DbRecSet = New ADODB.Recordset
DbConn.Open "Driver={mySQL};" & _
"Server=myserver.com;" & _
"Port=12370;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=myDatabase;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
End Sub
The connection parameters in the connection string have been edited for security purposes.
And this is what I get:
Quote:
Run-time error '-2147467259 (80004005)'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I have just download and installed the ODBC Driver from the MySQL website today. Filename: MyODBC-3.51.11-2-win.msi
I have also made sure that all the connection string parameters that I used are correct, and also checked it out with phpMyAdmin.
Thanks.
&"License Information For This Component Not Found&" Error
Hi Guys,
Whenevr I try to load "Mircosoft Data Bound Grid Control 5.0" into my project, I get this error :
License Information for this component not found. You do not have an appropriate license to use this functionality in the design environment
Any idea how can I solve this ?
Vb Error No. 3265 &"Items Cannot Be Found In This Collection&"
Whenever l select a record from the database l get the above error of 3265. I am using access database and l have four databases hence my four select statements. The error only occurs when records are read from the database. Below is my code.
SQLStr = "Select PlannerManager1.[LM_Fore_Name], PlannerManager1.[LM_Initial], PlannerManager1.[LM_Last_Name], PlannerManager1.[LM_OUC] from UnrecordedEstimates, PlannerManager1 where UnrecordedEstimates.[SentMailStatus] = 2 and UnrecordedEstimates.[Status] = 'K' and UnrecordedEstimates.[FIRST_NAME]= PlannerManager1.[Forename] and UnrecordedEstimates.[SURNAME_PLANNING]= PlannerManager1.[Surname] and UnrecordedEstimates.[JOB_PLNG_ETG_OUC]= PlannerManager1.[OUC]" 'Louise"
Dim dbs As Database
Dim Rs As Recordset
Dim Finalstr As String
Select Case mDBName
Case LASERDB_B 'this is the Bromley database
Set dbs = OpenDatabase("C:LaserBromleyLaser(b).mdb")
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_C
Set dbs = OpenDatabase("C:LaserCroydonLaser(c).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_P
Set dbs = OpenDatabase("C:LaserPortsmouthLaser(p).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
frmMail.lstMailPlanners.Clear
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.ManagerList.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
frmMail.Frame2.ZOrder
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_S
Set dbs = OpenDatabase("C:LaserCroydonLaser(c).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
End Select
Vb Error No. 3265 &"Items Cannot Be Found In This Collection&"
Whenever l select a record from the database l get the above error of 3265. I am using access database and l have four databases hence my four select statements. The error only occurs when records are read from the database. Below is my code.
SQLStr = "Select PlannerManager1.[LM_Fore_Name], PlannerManager1.[LM_Initial], PlannerManager1.[LM_Last_Name], PlannerManager1.[LM_OUC] from UnrecordedEstimates, PlannerManager1 where UnrecordedEstimates.[SentMailStatus] = 2 and UnrecordedEstimates.[Status] = 'K' and UnrecordedEstimates.[FIRST_NAME]= PlannerManager1.[Forename] and UnrecordedEstimates.[SURNAME_PLANNING]= PlannerManager1.[Surname] and UnrecordedEstimates.[JOB_PLNG_ETG_OUC]= PlannerManager1.[OUC]" 'Louise"
Dim dbs As Database
Dim Rs As Recordset
Dim Finalstr As String
Select Case mDBName
Case LASERDB_B 'this is the Bromley database
Set dbs = OpenDatabase("C:LaserBromleyLaser(b).mdb")
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_C
Set dbs = OpenDatabase("C:LaserCroydonLaser(c).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_P
Set dbs = OpenDatabase("C:LaserPortsmouthLaser(p).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
frmMail.lstMailPlanners.Clear
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.ManagerList.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
frmMail.Frame2.ZOrder
Rs.MoveNext
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
Case LASERDB_S
Set dbs = OpenDatabase("C:LaserCroydonLaser(c).mdb") 'this is the Croydon database
Set Rs = dbs.OpenRecordset(SQLStr, dbOpenSnapshot, dbReadOnly)
If Rs.RecordCount > 0 Then
Rs.MoveFirst
frmMail.ManagerList.Clear
While Not Rs.EOF
Finalstr = ""
Finalstr = Finalstr & Rs!LM_Last_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Initial
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_Fore_Name
Finalstr = Finalstr & ","
Finalstr = Finalstr & Rs!LM_OUC
frmMail.ManagerList.Clear
frmMail.tbsProcess.Tabs(2).Selected = True
frmMail.Frame2.ZOrder
frmMail.ManagerList.AddItem (Finalstr)
Wend
Else
MsgBox "No records found."
End If
Rs.Close
dbs.Close
Set Rs = Nothing
Set dbs = Nothing
End Select
Error "DataMember.Datafield Not Found" In Datareport
Hi Guys! Got a prob on Datareport, actually i used datashape t result in datareport, i used the following codes below.
rs.Open "SHAPE {SELECT * FROM calcutbl WHERE emp_id='" log_grid.TextMatrix(log_grid.Row, 0) & "' AND period1='" log_grid.TextMatrix(log_grid.Row, 12) & "' AND period2='" log_grid.TextMatrix(log_grid.Row, 13) & "'} " & _
" APPEND({SELECT dednm,dedamt,emp_id,date1,date2 FROM othde WHERE emp_id='" & log_grid.TextMatrix(log_grid.Row, 0) & "' AN date1='" & log_grid.TextMatrix(log_grid.Row, 12) & "' AN date2='" & log_grid.TextMatrix(log_grid.Row, 13) & "'} RELAT emp_id TO emp_id)AS rsothded,({SELECT nm,amt,emp_id,date1,date FROM othwage WHERE emp_id='" & log_grid.TextMatrix(log_grid.Row 0) & "' AND date1='" & log_grid.TextMatrix(log_grid.Row, 12) "' AND date2='" & log_grid.TextMatrix(log_grid.Row, 13) & "' RELATE emp_id TO emp_id)AS rsothwage", conn
Set PayslipRpt.DataSource = rs
PayslipRpt.Show
the rs should be:
JORGE REYES(PARENT RECORD)
Additional Payment - 50.00(1ST CHILD RECORD)
Deductions - 60.00(2ND CHILD RECORD)
But it resulted to "Datafield rsothwage.nm not found" error. Ho come when all the datafield and datamember of rpttextboxes i the details section are set already ex.
Anybody know how to overcome this error? i wasted so much tim already with this one.
FW: How Can I Launch "MS Word" Without Knowing The Path ? (FOUND IT)
It's ok, i've found the answer....
The Shell statement unfortunately only supports launching an EXE file
directly. If you want to be able to launch, e.g. Microsoft Word by
calling a .DOC file only, you can make your VB application launch the
associated program with the document using the following method:
Do the following declares:
#IF WIN32 THEN
Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd _
As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
#ELSE
Declare Function ShellExecute Lib "SHELL" (ByVal hwnd%, _
ByVal lpszOp$, ByVal lpszFile$, ByVal lpszParams$, _
ByVal lpszDir$, ByVal fsShowCmd%) As Integer
Declare Function GetDesktopWindow Lib "USER" () As Integer
#END IF
Private Const SW_SHOWNORMAL = 1
Launch applications using associated extensions with the following code:
Function StartDoc(DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
StartDoc = ShellExecute(Scr_hDC, "Open", DocName, "", "C:", SW_SHOWNORMAL)
End Function
Private Sub Form_Click()
Dim r As Long
r = StartDoc("c:my documentswordmyletter.doc")
Debug.Print "Return code from Startdoc: "; r
End Sub
Darren Logan BSc (Hons)
Development engineer
MICHELL INSTRUMENTS LTD
UNIT 9 NUFFIELD CLOSE,
NUFFIELD ROAD,
CAMBRIDGE,
UK.
CB4 1SS
Tel: +44 (0) 1223 434854Fax: +44 (0) 1223 434895
Switchboard: +44(0) 1223 434800
UKAS Accredited: Calibration No. 0179
ISO 9002 Through BSI Certificate No. Q6284
e-mail address: mailto: email@removed
Internet Address: http://www.michell.co.uk
Check For File To &"Kill&" Before &"RMDIR&"
as you know, all filles must be "killed" from a directory before "RMDIR" will excute. How can I check for the existence of files before usining ".RMDIR".
Here is the logic
If "\pathfolder" is not empty then
filesystem.kill "\pathfolder*.*"
filesystem.RMDIR "\pathfolder"
else filesystem.RMDIR "\pathfolder"
End if
Above is the logic, how can I execute in VBA.
Thanks
|