Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VB Error: "Error Accessing The System Registry"


This is not a coding problem, but I didn't know which forum to post in. If a mod feels it should be moved then go for your life.
Cheers.

When I try and view a projects references I get the error:

"Error accessing the system registry"

No err number or anything.

Ok...I DO have FULL access permissions to the registry, trust me on that b4 anyone jumps to that conclusion. It won't even work when I log in as the PC local admin.

I have un-installed VB, re-booted and re-installed, but the error is still there. Arrrrghhh.

I can view components added to the project and can add/remove these as I please, it's just references that I am having the problem with

Can anyone point me in the right direction?

And no, menhack, it's not coz I like licking slugs!

Woka




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
A Stupid Problem: "Error Accessing The System Registry" ("Solved") Thank You
This is a very silly problem. I tried to have a look of References from Project dropdown menu, it returned a critical error:

"Error Accessing the system registry".

I reinstalled VB6 but it seems that the problem still exists. Anybody please tell me how to solve the problem.

thanks in advance





Edited by - kenyiwei on 5/6/2004 2:07:51 AM

If I Use "SaveSetting App.Title, "Settings", "Font", "001122"" - Save Date In The Registry, Where Ca
If i use "SaveSetting App.Title, "Settings", "Font", "001122"" - save date in the registry, where can i find the value saved in the registry? Thanks

Solution> Error: """"&&H8007007E (-2147024770) The Specified Module Cannot Be Found"""
Hello

This is the error what i am getting after installing a package of one of my module on user testing machine.
The same module being working fine on others.


What can be the reason for this and what can be the probable solution for this?

Sandeep

Error "438" When Accessing Functions In The User Control From Form
HI... I am using a user control ( containing a few check boxes , Labels )
and adding a number of them dynamically on the form.
In the form i am able to access the basic vb attributes of the control like
.Top
.Visible etc

But when i call the functions in the control from the form i am getting the following error :

Run-time error '438'

Object doesnt support this property or method

Code snippet :

-----------------------------------------
Dim Company As Control
Set Company = Me.Controls.Add("Master.Company_Preference", "s" & index)

index = index + 1
Company.Top = indexTop
Company.Left = indexLeft
Company.Visible = True

Company.setRollNo = cmbRollNo.Text \ ERROR THROWN
Company.initialise (rc, majSpec, minSpec, cn) \ ERROR THROWN
--------------------------------------

Please help me out with this

Error: "There Was Problem Accessing Property Or Method Of OLE Objects"
Not a great VB programmer
so need some help regarding this..
i looked een original code..and try to copy it but still gives me same error. it this a database problem or not.
error: "There was problem accessing property or method of OLE objects"

here is code, where error is..
vb Code:
Private Sub Form_Load()Dim sSQL As StringDim bflag As Boolean sSQL = " SELECT yymmdd as ExamAsOfDate, " & _            " Cast((Sum(loans)+SUM(commitments)+ SUM(lcs)+ SUM(tradefinance)" & _            "-SUM(YtdSpecificReserve))as float)  AS TotalExposure, orgunit as ExamName " & _        " FROM tblMaster " & _        " GROUP BY yymmdd, orgunit " & _        " HAVING ((yymmdd='" & Form_frmMainMenu.cmbasofdate.Value & "') " & _            " AND (orgunit='" & Form_frmMainMenu.cmbexamname.Value & "'))"Form_frmReadList.RecordSource = sSQLMe.ExamYear.Value = Form_frmMainMenu.txtexamyear.Value  bflag = bAssignReadList(Form_frmMainMenu.cmbexamname, _                Form_frmMainMenu.cmbasofdate, "", "", 0, "BORR", "RECAL")If bflag = False Then    MsgBox sErrorDesc    DoCmd.close acForm, Form_frmReadList, acSaveNoEnd If  End Sub
error points to DoCmd.acForm, Form_frmReadList, acSaveNO

Error "CWBDB0001" When Accessing AS400 Table
There's an error when I browse the default.asp (localhost) with web browser IE5, BTW, the installed AS/400 Client Access Express for Windows is Version 4 Release 4


Code of Constant.inc

<%

Const SysName= "ABC Banking System"
Const DBNAME = "Provider=IBMDA400;Data Source=CPMWEB2;User ID=theuserid;Password=thepasswd;"
Const DbUser = "theuserid"
Const DbPasw = "thepasswd"
Const Admin = "XYZ"

%>

Code of default.asp
<%@ Language=VBScript %>
<!--#include file=Custom/Constant.inc-->

<%
   Dim SQL, RS, MyConn
   Dim strLogonID, strErrMsg, nTimelog
    
   Response.Expires=0
   Session("CustomerID") = ""
   Session("LastLogon")= ""
   Session("TimeLogon")= 0
   Session.Timeout = 15
   strErrMsg = ""
     
 
   If Request.Form("LogonID").Count<>0 Then
     
  
   SQL = "SELECT * FROM IB4DTALIB.sdpcusx WHERE spcust ='" & Request.Form("LogonID") & "'"
   Set MyConn = Server.CreateObject("ADODB.CONNECTION")
   Set RS = Server.CreateObject("ADODB.Recordset")
   
   MyConn.Open DbName,"",""
       
    RS.Open SQL,MyConn, 2, 3 <-- line 26
 :
 :
 :
 :

But it always prompts the below error message
Error Type:
IBMDA400 Session (0x80004005)
CWBDB0001 - Connection handle failed in attempt to contact server (System CPMWEB2)
/as400/default.asp, line 26


Thanks for helping! Kindly advise should more information is needed.

"System Files Are Out Of Date" Error With Installation Of VB Program On Windows2000
Hello
I created this installation package, it installs on windows xp, but with windows 2000 it comes up with the error

Quote:





Setup cannot continue because some system fines are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to
restart Windows before you can run setup again. Click cancel to exit setup without updating system files.






I did a search on the net for the error and came across the following link
http://support.microsoft.com/kb/q191096/

it basically says that this is an issue with installing VB on windows 2000 machines and provides a solution.
I was wondering if i could manually copy the dll's in the generated installation package to the appropriate windows folder(c:windowssystem32 in windows xp) and then the setup would not have to update the files

The package has the following dll's
asycfilt.dll
comcat.dll
dao350.dll
expsrv.dll
msjet35.dll
msjint35.dll
msjter35.dll
msrd2x35.dll
msrdo20.dll
msrepl35.dll
msstdfmt.dll
msvbvm50.dll
msvbvm60.dll
msvcrt40.dll
msvcrt.dll
oleaut32.dll
olepro32.dll

rdocurs.dll
scrrun.dll
vb5db.dll
vb6stkit.dll
vbajet32.dll
wbemcntl.dll


if this is one correct(one way to skin the cat) approach, can you guys tell me which folder should one copy these files to in windows 2000?

dao350.dll isnt being copied, so perhaps it does not to be copied

wbemcntl.dll is actually copied to two locations
c:windowssystem32 &
c:windowssystem32wbem
also are there any other files i would need to copy

VB6 && WinXP && ActiveMovie Control = "System Error"???
I'm trying to use the ActiveMovie control for the first time... I'm following step by step the instructions in MSDN and still can't get it to work...

When I try to run the app I get:
"System Error &H80004005 (-2147467259). Unspecified Error"

EVERY TIME!

I really don't know what to do? I can't even just put a control on the form with no code and run it without getting the error message.

Has anyone ever had any trouble with this control?

Please help if you have any ideas.

What I'm doing is trying to add MP3 playing capabilities. An old thread I dug up this one mentioned using ActiveMovie control... so I started messing with it.

Thanks in advance.

"No Permissions" Error With File System Object
I am getting a periodic Error 70 -- No Permissions when trying to open a file system object for update. When I step through the code in the debugger, it works fine, but when I run compiled code, it errors out. Has anyone else encountered this problem, and how did you fix it? I am running VB 6 on a 300MHz PII with 128 MB ram and 8+ GB hard drive.

"System Error &&H80070583 (-2147023485)"
I have created a simple program in VB6 that includes several forms; a main form, an options form and an about form. It runs perfectly well on the OS that I used to develop it with, but when I run it on a different one it produces the following error:

"System Error &H80070583 (-2147023485)"

Both OSes are Windows XP Service Pack 2 and both are up-to-date. It is the same computer so it can't be a hardware problem, however, the OS that the app does not work on does not have VB6 installed. Could this be the problem?

Thanks in advance!
Dom

Error Accessing System Registry
I havent used VB for a while.. when i opened it now, there goes an error already.. Error Accessing System Registry.. i cant go to the references...
well, the last thing i did in Vb, 3 days ago, was to register the crystal report's ocx.. Vb works fine by then..
no other activities.. just installed SQL server yesterday ( it also didnt work fine).. that's all.. what should i do to figure it out?

'error Accessing System Registry' Msg
Whenever I click on 'Tools - References' on the tool bar of MS Access 2002 in the VBA design code editor I get a message: 'error accessing system registry' in a dialog box titled 'Visual Basic', and cannot get into the references dialog box to add references to my program.

Any ideas what might be the reason?

Thanks,
Mark

Error Accessing The System Registry
When I click on References in VB 6, I get a "Error Accessing The System Registry" error!!! And I need to access those references s I can add those that are missing in my project!!!!

I check microsoft's website, they add suggestions, which were for crystal reports 8.0, and im using 7.0, tried what they suggested, nothing worked!!! Downloaded a "Reg-Fix" utility, still did not work!!!!! i dont know what to do!! Anybody experienced that too? Any way of fixing it!! Oh, I also re-installed VB, same problem!! Help!!!

Error Accessing System Registry
I just got a new notebook with windows vista business. i installed vb6 sp6 and tried to open a project but an error occured.

The error says:

ERROR ACCESSING THE SYSTEM REGISTRY.

Any help is highly appreciated. Thanks!

Error Accessing System Registry
im trying to access references from my project but this error comes up "Unable to access system registry". I ahve tried to reinstall VB6 but the error still comes up.

Error Accessing System Registry
the above said error messages occurs when i try to include a reference . that is when i select the project menu and reference .


I am not able to include any reference. Can u suggest a solution.

Error Accessing The System Registry
Hi, when I select Project..References I'm getting "Error accessing the system registry". The help says that the registration database for my system has been corrupted. I've uninstalled and reinstalled VB and get the same problem. What can I do?

VB6 Enterprise
Thanks in advance

Error Accessing The System Registry
Hi Gurus,
When i access the refrences under the project menu i get an error message
"Error acessing the system registry". I am using a P4 machine and my OS is
Windows XP professional. Plaease help me to solve the issue.
Thanks In advance
Regards
Krishna Kumar.

Error Accessing The System Registry
I am facing a problem with two VB6 installations.

Whenever I try to access the references of any project (active dll or even exe), I get
"Error accessing the system registry" message.

But I can access the components option of the same project menu.

At the begining I thought the problem was caused by a installation
of VB .Net I did on the same machine.

But I have noticed that I am facing the same problem in a second machine.

Apart from Windos XP SP2, I have got Office 2003, VB4, VB5, VB6 and crystal Reports 7.

I'd appreciate if any one can help me on this

Regards,

Adão

Error Accessing System Registry
Dear All
 
  I am having windows xp. I installed vb 6.0, but when i try to open the application it is showing
 
Data View:
Automation error: Error accessing system registry.
 
I was not able to open reference dialog box.It shows error accessing system registry.
 
I even uninstalled the visual studio 6.0 and crystal report 8.0 and again installed the VS,it failed and the same problem persist.
 
How to solve this issue.
 
Please help me out.
 
Regards
Sasikumar
 

=

Error Accessing System Registry!
Dear Friends:
Does anyone know about this problem?
when I open the references in VB6.0 it's saying Error Accessing system Registry.
I tried to reinstall the VB6.0 but it's still giving this error.
(This error is not visible on other computers, and I just formated my computer, so it's new)

Something else:
Sometimes while I open a project or a from (on some computers), it's giving VB6.o error.



Error Accessing System Registry!
Dear Friends:
Does anyone know about this problem?
when I open the references in VB6.0 it's saying Error Accessing system Registry.
I tried to reinstall the VB6.0 but it's still giving this error.
(This error is not visible on other computers, and I just formated my computer, so it's new)

Something else:
Sometimes while I open a project or a from (on some computers), it's giving VB6.o error.



Error Accessing System Registry
Whenever I try clicking reference on project menu, I receive an Error Message "Error Accessing the System Registry". it only happened when our ISP PRovider configured my computer to have internet access. I don't know if what they did somehow affect the registry or something. I tried re-installing my vb software but still it did not work. my friend suggested to format my computer. I don't know if this is the only way possible, That is why i post my message.

I hope anyone can help me. Your help would be highly appreciated!

Thank you

Error Accessing The System Registry
Hi, I have a vb6 application with an access db and crystal reports. I had it all running and had a big crash. I reloaded vb and when I try to click on project/references, it says error accessing the system registry. When I try to click on Project/Add Crystal Reports 8, it says class not registered.
Do these mean anything to you?
Thanks in advance.
Other than the crystal report problem, my application is working.

thanks
leadfinger
http://www3.nbnet.nb.ca/gspil

Edited by - leadfinger on 4/28/2004 12:07:05 PM

Error Accessing System Registry
hi all,

i got VB6.0 and crystal report 8.5 installed on my xpsp2 machine
the problem is i cannot get into project->references
an error pop up says 'error accessing system registry'
other than that is fine
this program still can compile and run
and i didn't get this error when working on win98 machine with the same prog

some help pls, TQ

Error Accessing System Registry Woes
I often code VBA macros at work, using version 6.0 for Office 2003 under Windows XP. Recently, I've been running into some troubling behavior. Whenever I try to add or change a reference (in any VBA platform, so this includes Excel, Word, etc) to a DLL file, I get the error message "Error accessing system registry", and am unable to continue further. However, the programs that were referencing something before I ran into this problem continue normally. I have tried repairing Excel, running System Restore, and verifying I have permissions for the registry in question. I have cleaned the registry, and nuked all pre-existing VBA keys to no effect. I do not have Crystal Reports or any similar software installed, and have admin rights on my machine. I have tried reading each FAQ and using whichever solutions provided.

Is there anything further that can be causing this, and how might I fix it?

Thank you!

Error Accessing System Registry-Remainder
Dear All
 
          For the past 6 months I am working in VB 6.0 application with windows XP. I have not faced any problem. Actually my system is connected in domain. Since there is problem while opening my appl using domain login, I usually work with local/admin login. 2 days before I tried to work using domain login, it shows error accessing system registry since i am using activex controls. After that it starts working. Again i tried to open an new or existing vb application using local/admin login .It shows an error
 
Data View:
"Automation Eror.Error accessing system registry" in my local/admin login itself.
 
After that i was not able to open the reference dialog box.It shows Error accessing system registry.
 
How to solve this issue.Please assist.
 
Regards
Sasikumar

=

System Error "&&H80077007E"
I have a program (exe) can run in four computers with no problem but the following message displayed in the fifth computer:

System Error &H8007007E (-2147024770)

All computer running Window XP (SP2) and connected to a small office network. But they have user loaded applications in each of the computer.

Error Accessing System Registry While Opening VB Application
Dear All
 
          For the past 6 months I am working in VB 6.0 application with windows XP. I have not faced any problem. Actually my system is connected in domain. Since there is problem while opening my appl using domain login, I usually work with local/admin login. 2 days before I tried to work using domain login, it shows error accessing system registry since i am using activex controls. After that it starts working. Again i tried to open an new or existing vb application using local/admin login .It shows an error
 
Data View:
"Automation Eror.Error accessing system registry" in my local/admin login itself.
 
After that i was not able to open the reference dialog box.It shows Error accessing system registry.
 
How to solve this issue.Please assist.
 
Regards
Sasikumar

=

EnumWindows AddressOf EnumWindowsProc, 0 "Syntax Error"</title> <script Type="text/javascript"> <!-- Function PrintTags() { Var Curr=document.getElementById('vB_Editor_QR_textarea').value;
I get "Syntax Error" when i put this code in to a button. Whats wrong?

EnumWindows AddressOf EnumWindowsProc, 0


______________________________________________________________________
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long

Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Dim Length As Long
Dim sName As String
Dim Temp As String
Static iCount As Integer

iCount = iCount + 1
Length = GetWindowTextLength(hwnd) + 1

If Length > 1 Then
sName = Space(Length)
GetWindowText hwnd, sName, Length
If Left(sName, Length - 1) Like "Order*" Then MsgBox "window found!"
End If

EnumWindowsProc = 1
End Function

"Type Mismatch"/"Invalid Qualifier" Error
Hi all

Am just using VB6 for the first time. Am connecting to a SQL Server 2000 database. What i am trying to do is simple select a single cell from the database into a string variable and then hold onto that variable for as long as i need it. The problem is that when i go to put the value into the variable i get a "Type Mismatch" error or an "Invalid Qualifier" error

The global variable that i am using:
Dim conn as new ADODB.Connection
Dim cmd as new ADODB.Command
Dim tempString as String

The connection string that i am using is:
conn.open "UID=;pwd=;Database=Marts;" & _
"Server=localhost;Driver={SQL Server};

The statement that i am executing is:
cmd.ActiveConnection = conn
cmd.commandType = adCmdText
cmd.commandText = "Select ColumnA from TableA where ColumnB = 'ABC'"
tempString = cmd.Execute

Vista Error: "program Is Not Working" And App "has Run Out Of Time"
Client is running my vb6 app on Vista (in XP compatibility mode), and is getting an error that indicates the app "has run out of time and shuts the program down" (her words). This happens in a very specific section of the pgm that no xp machines report errors in.

Separately, on (attempted) startup, she gets the message that the app "has stopped working, where Windows will close the program and notify me later if a solution is available." But the solution is "as easy as allowing the program to close then re-opening it back up"

Help!?

OPENING VISUAL BASIC 6.0 ERROR, DAO350.DLL, "Unexpected Error; Quitting"
Hi,

I could really use some help. I am not the most knowledgable and would appreciate any guidance... I did a web search already at some sites including Microsoft, but I have not found a soultion yet.

Problem: CANNOT OPEN VISUAL BASIC 6.0; Says "Unexpected error; quitting"
Machine/Software:
OS: XP Media Center (although system info says XP Professional 5.1.2600 Service Pack2 Build 2600)
PC: Acer AspireE36
SW:Microsoft Visual Studio 6.0 Enterprise Edition

History:
1. Could not open visual basic 6.0. I got the an error that the DAO350.DLL could not be found.

2. So following some suggestions from the web:
a) Renamed old DAO350.DLL as DAO350.DLLOLD
b) I took this file from Visual Studio Disk 1 and copied it into the
C:Program FilesCommon FilesMicrosoft SharedDAO
c) Regsvr32 "C:Program FilesCommon FilesMicrosoft SharedDAODAO350.DLL"
d) Then I got a successful message that it registered
e) It did not work. When I tried to open the visual basic 6.0 now I get:
"Unexpected error; quitting" message.

WHAT DO I DO PLEASE?

I even loaded the component checker 2.0 as suggest via microsoft website to look up the Microsoft Data Access Components (MDAC).
(see Article ID: 304230 and 301202 on http://support.microsoft.com/kb/304230 and htpp://support.microsoft.com/default.aspx?kbid=301202))

It says MDAC 2.8 SP1 ON WINDOWS XP SP2. I am not sure what this MDAC does for me, but I looked at it anyways.

"Run-time Error 424 - Object Required" Error When Upgrading A Activex Control
When I compile (upgrade) a activex control the program using it gives an error saying "Run-time error '424' - Object Required". If you delete the object from the vbp file and reopens the program and add the component again it'll work just fine.. But as soon as I try to upgrade this error will occur when trying to see the form of the new project using the upgraded activex control. The upgrade procedure seems to work fine though and the error occurs, as I said, only when I try to see the form of the project.

"Run-Time Error '28':" "Out Of Stack Space"
Ok, I know the cause of this issue is one sub calling another, repeaditly. It runs about 3400 loops before crashing, but is not infinite. I was wondering if anyone knew a way to clear the stack during it's run.

Datagrid Runtime Error "6160"Data Access Error
hi,please help,when i click a the datagrid have this error message come out.
runtime error "6160"Data Access Error.

this is the current code:

Code:
Private Sub Form_Load()
Dim rs1 As ADODB.Recordset
Dim rs2 As ADODB.Recordset
Dim rs3 As ADODB.Recordset
Dim UserId As String


'sql query login user department
Set m_rs = OpenRecordset("select * from [Temp]" & vbCrLf & _
"where ([Department] in (" & vbCrLf & _
" select [DepartmentName] from [Department]" & vbCrLf & _
" where [Id] in (" & vbCrLf & _
" select [DepartmentID] from [UserDepartment]" & vbCrLf & _
" where [UserId] = '" & gUserId & "'" & vbCrLf & _
" ))" & vbCrLf & _
") or exists(SELECT * FROM UserRoles WHERE [UserId] = " & gUserId & _
" and [RoleId] in (select [Id] from [Roles] where [RoleName] in ('admin','guest')))" & _
"", adOpenStatic, adLockOptimistic)


Set DataGrid1.DataSource = m_rs
Debug.Print "Connection Object Created"


lpPrevWndProc = SetWindowLong(DataGrid1.hWnd, GWL_WNDPROC, AddressOf WndProc)
End Sub

Private Sub DataGrid1_Click()
txtempname.Text = DataGrid1.Columns(1)
txtempno.Text = DataGrid1.Columns(2)
txtdesignation.Text = DataGrid1.Columns(3)
txtdepartment.Text = DataGrid1.Columns(4)
txtDateOt.Text = DataGrid1.Columns(5)
txttimefrom.Text = DataGrid1.Columns(7)
txttimeto.Text = DataGrid1.Columns(8)
txtwork.Text = DataGrid1.Columns(12)
txtworkdetail.Text = DataGrid1.Columns(13)

End Sub

thanks for help!

Error In Running A Screen Saver "Run-time Error '6' Overflow"
Im running the program screen saver but i receiving this error its says Run-time error '6' Overflow i hope anyone could fix this thanks ...

VB Code:
Private Sub Form_Load()Dim res   'I made this array to translate name of day to Indonesia   'language. You can change this array elemen to your   'country language. Start from Sunday...   aHari = Array("Sunday", "Monday", "Tuesday", "Wednesday", _                "Thursday", "Friday", "Saturday")   sHari = aHari(Abs(Weekday(Date) - 1))   frmMain.Caption = "LOGIN PROGRAM Versi 1.0"   frmMain.Timer1.Enabled = False   Timer1.Enabled = True   DoEvents   Label1.Caption = "" & sHari & ", " _                   & Format(Date, "mmmm dd yyyy")   Label2.Caption = Format(Time, "hh:mm:ss")   DoEvents   App.HelpFile = ""   res = SetWindowPos(frmScreenSaver.hWnd, _                      HWND_TOPMOST, 0, 0, 0, 0, _                      flags)End Sub


But its only highlightened at


VB Code:
App.HelpFile = ""res = SetWindowPos(frmScreenSaver.hWnd, _                      HWND_TOPMOST, 0, 0, 0, 0, _                      flags)

Any Ideas Why This Brings Up A "Compile Error- Argument Not Optional" Error?
Any ideas why this brings up a "Compile error- Argument not optional" error?

The Declares are:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long
Private Declare Function BringWindowToTop Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const WM_SETTEXT = &HC


Problem code:

Private Sub Command3_Click()
Call PutTextIntoNotepad
End Sub

Private Sub PutTextIntoNotepad(hWnd As Long)

'This adds text to notepad, by locating its
''Edit' class window. This is similar to the
'method used to locate the hwnd itself, but
'here we know the parent (hWnd) so only
'have to search its child windows.

Dim hWndChild As Long
Dim sMsg As String
Dim sBuffer As String * 32
Dim nSize As Long

'this string is split only to fit the browser window
sMsg = "This method demonstrates using SendMessage()"


'get the first child window in Notepad
hWndChild = GetWindow(hWnd, GW_CHILD)

'hwndchild will = 0 when no more child windows are found
Do While hWndChild &lt;&gt; 0

'get the Class Name of the window
nSize = GetClassName(hWndChild, sBuffer, 32)

'if nSize &gt; 0, it contains the length
'of the class name retrieved
If nSize Then

'if the class name is "Edit",
'set some text and exit
If Left$(sBuffer, nSize) = "Edit" Then

Call SendMessage(hWndChild, WM_SETTEXT, 0&, ByVal sMsg)
Exit Sub

End If

End If

'not found, so get the next hwnd
hWndChild = GetWindow(hWndChild, GW_HWNDNEXT)

Loop

End Sub


Thanks for the help, guys!
Daniel Christie

Datagrid Runtime Error "6160"Data Access Error
hi,please help,when i click a the datagrid have this error message come out.
runtime error "6160"Data Access Error.

this is the current code:
Code: Private Sub Form_Load()
    Dim rs1 As ADODB.Recordset
    Dim rs2 As ADODB.Recordset
    Dim rs3 As ADODB.Recordset
    Dim UserId As String
 
   
    'sql query login user department
    Set m_rs = OpenRecordset("select * from [Temp]" & vbCrLf & _
                            "where ([Department] in (" & vbCrLf & _
                            " select [DepartmentName] from [Department]" & vbCrLf & _
                            " where [Id] in (" & vbCrLf & _
                            " select [DepartmentID] from [UserDepartment]" & vbCrLf & _
                            " where [UserId] = '" & gUserId & "'" & vbCrLf & _
                            " ))" & vbCrLf & _
                            ") or exists(SELECT * FROM UserRoles WHERE [UserId] = " & gUserId & _
                            " and [RoleId] in (select [Id] from [Roles] where [RoleName] in ('admin','guest')))" & _
                            "", adOpenStatic, adLockOptimistic)
        
    
    Set DataGrid1.DataSource = m_rs
    Debug.Print "Connection Object Created"
    

lpPrevWndProc = SetWindowLong(DataGrid1.hWnd, GWL_WNDPROC, AddressOf WndProc)
End Sub

Private Sub DataGrid1_Click()
   txtempname.Text = DataGrid1.Columns(1)
    txtempno.Text = DataGrid1.Columns(2)
    txtdesignation.Text = DataGrid1.Columns(3)
    txtdepartment.Text = DataGrid1.Columns(4)
    txtDateOt.Text = DataGrid1.Columns(5)
    txttimefrom.Text = DataGrid1.Columns(7)
    txttimeto.Text = DataGrid1.Columns(8)
    txtwork.Text = DataGrid1.Columns(12)
    txtworkdetail.Text = DataGrid1.Columns(13)
    
End Sub

thanks for help!

"On Error GoTo DoSomething_Error" Returns Error 0.. What Is Error 0??
Hello, I have a try/catch function is always is cought with an error0... What is an Error 0?

here is my code:


Code:
Private Sub ProcessCreditCard_Timer()
Dim CCstatus As String
Dim racAuthCard As Variant
Set racAuthCard = CreateObject("RACAuthcreditcard.Authcreditcard")

racAuthCard.transactionKey = "asdfasdfasfffff"
racAuthCard.login = "asfdsad"
racAuthCard.transactionType = "AUTH_CAPTURE"

Question = "Processing Credit Card Now. Please Standby."
On Error GoTo DoSomething_Error

CCstatus = racAuthCard.Authcreditcard(Total, CCnumber, ExpMonth, ExpYear, CCFirstName, CCLastName)
ProcessCreditCard.Enabled = False

If CCstatus = "This transaction has been approved." Then
Question = "Credit card transaction approved. One moment."
CCnumber = Right(CCnumber, 4)
Paidby = "Credit Card"
Call Thankyou
ElseIf CCstatus = "Problem! reason: The credit card number is invalid." Then
'CCnumber = Right(CCnumber, 4)
CCnumber = "0"
Question = "Credit Number invalid or NSF. Press the Start button to start again."
ElseIf CCstatus = "(TESTMODE) This transaction has been approved." Then
CCnumber = "TESTMODE" 'Right(CCnumber, 4)
Paidby = "TESTMODE"
Call Thankyou
Else
'CCnumber = Right(CCnumber, 4)
CCnumber = "0"
Question = "Authentication channel not found. Please try again in 30 seconds."
End If
Exit Sub



DoSomething_Error:
Select Case Err.Number
Case -2147012889 'cannot resolve DN
'MsgBox ("cnrdn")
CreditCardAuthRetry = CreditCardAuthRetry + 1
'Command1.Caption = CreditCardAuthRetry
If CreditCardAuthRetry > 100 Then
ProcessCreditCard.Enabled = False 'try for 1 second
Question = "Authentication channel not found. Please try again in 30 seconds."
End If

Case 0
'This is to catch all successful Credit Card Processes.. so it doesn't go to else

Case Else
'MsgBox ("Sorry we are having technical difficulties")
'email me the error number

ProcessCreditCard.Enabled = False

CCnumber = "0"
Question = "I am sorry, but we cannot take credit cards right now. "
'Call ClearAll


End Select


End Sub

and I know the credit card processing goes through fine (I can login to my merchant account and see it)...

what does an Error 0 mean, should I be worried? I basically setup my catch statement to ignore an error 0 .. but i want to know if that is a good idea .. or if i can "fix" this issue?

thanks!
Lee

Error Handeling: "Runtime Error '-2147024809 (80070057)' "...
...what do I do about it? I've tried handeling it like other error numbers but nothing seems to work.

Thanks.

How Do You Stop That Annoying "Javascript Error - Do You Wish To Debug"? Error
Try this:


Code:
<script language="JavaScript">
<!--

function stopError() {
return true;
}

window.onerror = stopError;

//-->
</script>

I Ran An Executable VB5 Program And Got An Error Message "Unexpected Error"
I ran a standalone VB5 program and got an error message
"Unexpected error". This message comes up before the form even appeared.

This happened, when I compiled VB 5 project in one of the Win2K. The executable ran for the computer where I created that executable, but it won 't run for other computer.

When this same project is creating an executable in another Win2K, the executable ran on all other computer.

======================================

Here is where the problem is.

On the Win2K computer that has problem, I did this.
In Visual Basic 5.0 Project --> References, there is a reference to
"Microsoft Winsock Control 6.0 (SP5)". When I removed this reference, and create a stand-alone executable application, the application run on all the machines. When I put this back in, it causes problem for other machines.

====================

On the Win2K computer that does not have any problem, I did this.
In Visual Basic 5.0 Project --> References, there is a reference to
"Microsoft Winsock Control 5.0". When I create a stand-alone, executable application, the application run on all the machines.

====================

So the problem is with the "Microsoft Winsock Control 6.0 (SP5)". When I copied the file mswinsck.oca from the good machine to the problem machine, the Project --> References in the problem machine did not changed to "Microsoft Winsock Control 5.0". How do I make the problem machine to use "Microsoft Winsock Control 5.0" instead of "Microsoft Winsock Control 6.0 (SP5)" ?

VB,WordPerfect In Windows 98. Runtime Error "Automation Error"
Hi,

  I am working with Vb and word Perfect. I created an object of word perfect and use the object to open the wordperfect document for updating the bookmarks dynamically. It is working fine in Windows XP OS. If i try the same application in Windows 98 i am getting "Runtime Error : -2147417848 (80010108) Automation Error". It is creating the Object but it is unable to use the created object to open the file.

If anyone has a soultion for this problem do let me know

Thanks in Advance.

Prakash.

VBA "run Time Error '9' SubScript Out Of Range" Error Occured Plz Help
Hai friends,
I am new to Visual basic so i have not a depth knowldge of it that why i need urs help.

In my Problem i want to select one value from the combo box and i want that another value which is in database can show automatically in another textbox on the selection of the distributer.

just like that "state is shown on the selection of country"

plz help and thanx is advance.


The code is

'Change Distributor List on basis of checkBox if Indian Title is Checked
'--------then indian distributor list displayed in Distributor combo box else international list
Private Sub chklocal_Validation(Cancel As Boolean)
   Dim intCount, tempFieldArr
   If Chklocal.Value = 0 Then 'If uncheked
    cboDistributer.Clear 'Clear the Distributor combo
        txtDiscount = ""
        flag = 0 'Means global
        For intCount = 1 To objindianDistributors.Count 'For 1 to international distributor collection
            tempFieldArr = objindianDistributors.Item(intCount) 'Fill items one by one in a Array
            cboDistributer.AddItem tempFieldArr(1) & " / " & tempFieldArr(2) & " / " & tempFieldArr(0) 'Add Array items into combo
       Next
    ElseIf Chklocal.Value = 1 Then 'If Checked
        cboDistributer.Clear 'Clear the Distributor combo
        txtDiscount = ""
       flag = 1 'means local
        For intCount = 1 To objInternationalDistributors.Count
            tempFieldArr = objInternationalDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(1) & " / " & tempFieldArr(2) & " / " & tempFieldArr(0)
        Next
    End If
End Sub

'Fill Discount column on the basic of distributor
Private Sub cboDistributer_Click()
    Dim discCat As String, discount As Double
    Dim intCount As Integer
   Dim tempFieldArr
   
    If (cboDistributer.Text <> "") Then
        discCat = Right(cboDistributer.Text, 3)
        If flag = 1 Then ' here if listbox is checked then following code run
        For intCount = 1 To objMuIndnDistributors.Count
            tempFieldArr = objMuIndnDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(0)
        Next

   ' here txtDiscount is the textbox name where i want to need that value show on the selection of combobox value
    txtDiscount = objIndianDistributors.Item(getIndex(objIndianDistributors, discCat))(0) 'error line

        ElseIf flag = 0 Then ' here if listbox is unchecked then following code run
        For intCount = 1 To objInternationalDistributors.Count
            tempFieldArr = objInternationalDistributors.Item(intCount)
            cboDistributer.AddItem tempFieldArr(0)
        Next
    txtDiscount = objInternationalDistributors.Item(getIndex(objInternationalDistributors, discCat))(0) 'error line

        End If
    End If
End Sub

--> or if u have any code similar to this then plz send me
thanx
reply soon that is very urgent





Edited by - vbhem4u on 6/26/2007 4:47:05 AM

How To Get Path To User's "My Documents" When Running A "System" Process?
My program generates PDF files through a postscript printer driver. The UI portion of the code is called from my Port Monitor which makes it a "SYSTEM" process (ie not one started by the user).

When trying to access the path to "My Documents", I get "C:Documents and SettingsLocal Service" which is not the user's directory.

Tried:
various API Calls, environment variable with the same answer. Obviously I searched this forum at nauseum, The API guide and this forum.

My Options (as far as I can see right now):
Registry: HKEY_CURRENT_USER/Volatile Environment/HomePath or File searching through "C:Documents and Settings" for recent files to guess at who might be the current user. Frankly, I am not happy at either of these.

Am I missing something obvious? Thx a lot to anyone with suggestions.

Get Value Of "System Idle Process" In "Windows Task Manager" ?
Hello,

Is their any way to get the "System Idle Value" the same value that we see in the "Windows Task Manager"

I need this value for my program, if this value is around 90 or above , my program can start , if it is below , I will put a message telling "That he need more resources" or something like that.

Thank you for your help

Best Regards,
Didier.

"server Not Yet Been Opened" & "Object Variable Or With Block Variable Not Set" Error
I'm a new user of Crystal Report 8.5. I'm using VB6 and SQL Server 2000. I have designed a report at CR 8.5 and inserted it on VB 6, how will I connect?
I have tried a sample code below but I'm getting an "Object variable or with block variable not set" error. How do I solve this? Please Help. Thanks in advance Gurus

'General Declaration
Dim Report As New CrystalReport1
Dim crApp As New CRAXDRT.Application
Dim crReport As CRAXDRT.Report
Option Explicit

Private Sub Form_Load()
Dim crTable As cRAXDDRT.DatabaseTable
Set crReport = crApp.OpenReport("c:durden mmiclossratioreport.r pt")
crTable.SetLogOnInfo "servername", "dbasename", "userid", "password"
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub



And when I'm using this code, I'm getting a "Server has not yet been opened" error.



'General Declaration
Dim Report As New CrystalReport1
Dim crApp As New CRAXDRT.Application
Dim crReport As CRAXDRT.Report
Option Explicit

Private Sub Form_Load()
Dim crTable As cRAXDDRT.DatabaseTable
Set crReport = crApp.OpenReport("c:aris mmiclossratioreport.rpt ")
crReport.Database.Tables(1).SetLogOnInfo "mis002", "mqs", "aris", "110796"
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub



--

Stored Procedure Error - Has Too Many Arguments Specified. ERROR</title> <script Type="text/javascript"> <!-- Function PrintTags() { Var Curr=document.getElementById('vB_Editor_QR_textarea').value; Newval=curr.r
Hi!

I need to execute my insert stored procedure more than once, when the stored procedure gets executed for the second time I get an error:


Procedure or function up_NewPricesInsert has too many arguments specified.


What should I do to execute the sp more than once?

PEACE!

Copyright © 2005-08 www.BigResource.com, All rights reserved