application defined or object defined error on form

I have 2 forms. My main form which has a button to open another form(search
form) and be able to select the customer that is to be viewed. I actually
didn't create this form, a co-worker did and they are new to it. Well they
renamed the form, table etc. It looks as if everything is changed correctly
but for some reason my search form is erroring out. Not sure if it's because
of the name change or something else. This selection worked before until this
name change. So, On my search form, you can select a customer and click on
the select button, which has this logic:

 varID = Me.frmActionRequestSearch_subform!ARID
    If IsNull(varID) Or Err.Number = 2427 Then
        MsgBox "There are no matching records found, vbExclamation"
        Exit Sub
    End If
    
    On Error GoTo HandleErr
    
    Forms!frmActionRequest!cboARID = Me.frmActionRequestSearch_subform!ARID
    Forms!frmActionRequest!cboARID.SetFocus
    Forms("frmActionRequest").cboARID_AfterUpdate
  

I have done a debug and stepped through the logic to see where this was
erroring out. It happens to error out on the last line:
Forms("frmActionRequest).cboARID_AfterUpdate

When I click on the select button I get application defined or oject defined
error. I don't see why I'm getting this.

this function is there and works here is the cboARID_AfterUpdate logic

Private Sub cboARID_AfterUpdate()
On Error GoTo HandleErr
    
    Me.RecordSource = "SELECT * FROM qryActionRequestLoad WHERE ARID = " & Nz
(Me!cboARID, 0)
       
    If Me.frmCost.SourceObject <> "" Then
        Dim frm As Form_frmCost
        Set frm = Me.frmCost.Form
    End If
        
        
ExitHere:
    Exit Sub

HandleErr:
    MsgBox Err.Description
    Resume ExitHere
End Sub

Any help is very much appreciated! Thanks!

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1

0
klp
3/15/2010 6:41:19 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
1151 Views

Similar Articles

[PageSpeed] 35

The code for the  after update event of the combo doesn't seem to do much
This part of the code doesn't seem to do anything useful, after it the Set 
frm = line.
Is there more to this bit of code?

If Me.frmCost.SourceObject <> "" Then
        Dim frm As Form_frmCost
        Set frm = Me.frmCost.Form
 End If


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia





"klp via AccessMonster.com" <u19032@uwe> wrote in message 
news:a50e9508a88ce@uwe...
>I have 2 forms. My main form which has a button to open another form(search
> form) and be able to select the customer that is to be viewed. I actually
> didn't create this form, a co-worker did and they are new to it. Well they
> renamed the form, table etc. It looks as if everything is changed 
> correctly
> but for some reason my search form is erroring out. Not sure if it's 
> because
> of the name change or something else. This selection worked before until 
> this
> name change. So, On my search form, you can select a customer and click on
> the select button, which has this logic:
>
> varID = Me.frmActionRequestSearch_subform!ARID
>    If IsNull(varID) Or Err.Number = 2427 Then
>        MsgBox "There are no matching records found, vbExclamation"
>        Exit Sub
>    End If
>
>    On Error GoTo HandleErr
>
>    Forms!frmActionRequest!cboARID = Me.frmActionRequestSearch_subform!ARID
>    Forms!frmActionRequest!cboARID.SetFocus
>    Forms("frmActionRequest").cboARID_AfterUpdate
>
>
> I have done a debug and stepped through the logic to see where this was
> erroring out. It happens to error out on the last line:
> Forms("frmActionRequest).cboARID_AfterUpdate
>
> When I click on the select button I get application defined or oject 
> defined
> error. I don't see why I'm getting this.
>
> this function is there and works here is the cboARID_AfterUpdate logic
>
> Private Sub cboARID_AfterUpdate()
> On Error GoTo HandleErr
>
>    Me.RecordSource = "SELECT * FROM qryActionRequestLoad WHERE ARID = " & 
> Nz
> (Me!cboARID, 0)
>
>    If Me.frmCost.SourceObject <> "" Then
>        Dim frm As Form_frmCost
>        Set frm = Me.frmCost.Form
>    End If
>
>
> ExitHere:
>    Exit Sub
>
> HandleErr:
>    MsgBox Err.Description
>    Resume ExitHere
> End Sub
>
> Any help is very much appreciated! Thanks!
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1
> 


0
Jeanette
3/15/2010 8:52:57 PM
Reply:

Similar Artilces:

Unknown Error
Anyone have any idea why I can't delete a message in a Junk folder? I'm getting a plain/simple dialog box saying "Unknown Error" and the message will not delete. Trying to move it to the Inbox, for example, returns a dialog box message saying "Can't move the items. The item could be moved. It was either already moved or deleted, or access was denied." Any ideas? Thanks, Tom Robbins tomweho@hotmail.com On Wed, 29 Nov 2006 09:14:44 -0500, "Exchange Groups" <tomweho@hotmail.com> wrote: >Anyone have any idea why I can't delete a...

Clicking one application's buttons from another application
Hello, I'd like to write an application that can click the buttons of another application running on the same machine. All my application knows about the target application is its name, the name of the window containing the buttons, and the name of the buttons. Can someone further my education in this matter in some way. Thanks, Ray Mitchell This is tricky, but possible. I actually do it in a little utility I wrote to move Outlook filters down, since the "Move Down" button doesn't autorepeat and when you have 850 anti-spam filters it becomes a bit unwieldy. What yo...

Bizarre Reports Error
For Some Unknow Reason all my reports are playing up, when i open any report now, it looks like its zoomed x1000 in the Left Top Report Header, Tried zooming out and nothing, the report just gets smaller. the only way i seem to cure this is when i click setup on the report preview and then go columns tab change some thing, change it back click apply and OK then the report Is correctly displaying its self, and im having to do this every time i open a report. any one know whats causing it? On 28 Aug, 19:06, Maurice <Maur...@discussions.microsoft.com> wrote: > Have you tried sett...

Printing Forms/Reports Containing Hyperlinks
I have a form I created that contains hyperlinks to a dashboard. When I print the form/report, it also prints the "Back to Dashboard" hyperlink. How do I suppress printing of hyperlinks on forms? Two possibilities come to mind. First, you could add a Print command button and have one of the actions of that button change the font color of the hyperlink text to white - so it would still print but not be visible - and then change it back after the print operation was done. Not particularly difficult to do, but if you aren't the sole user of the workbook, others might just sel...

running another application from my application
Hello, I have an MDI application that on a specific case runs a 3rd party application. I use PeekMessage so my application will be drawn corretly while working on the 3rd party app. I want to prevent the user from doing anything in my application while te 3rd party app is running, until the user closes the 3rd party application. Also I want my application to be shown correctly (handle WM_PAINT, WM_DRAW etc.). Currently my application is displayed very well, but the user may do things in my application while the 3rd party app is running. I use the following code (pseuo): BOOL bRetVal = CreateP...

SMTP Protocol 7004 & 7002 Error
I have Exchange server 2003 with sp1, an my event logs a filling with errors 7004 or 7002, How should I interpreted those results : IP are external IP: Event Type: Error Event Source: MSExchangeTransport Event Category: SMTP Protocol Event ID: 7004 Date: 02.10.2005 Time: 19:23:31 User: N/A Computer: HIS10 Description: This is an SMTP protocol error log for virtual server ID 1, connection #21. The remote host "64.4.50.99", responded to the SMTP command "rcpt" with "550 Requested action not taken: mailbox unavailable ". The full command sent was "RCPT...

Application exiting with return Code 3 and ExitInstance not called neither destructors
Hey Friends It seems that i have done something very mysterious as my Application is exiting with return Code 3 and ExitInstance is not not called neither destructors. Plz Help "Vikrant_kpr" <bhatia.manish@netsity.com> wrote in message news:f62362ec.0307170549.7af528cf@posting.google.com... > Hey Friends > It seems that i have done something very mysterious as my Application > is exiting with return Code 3 and ExitInstance is not not called > neither access violation? Dear Antonio Mazzeo I have corrected the problem,it was causing due to Splash Screen Compone...

Ideas for a Dept Level Application Support
We have an IT group that supports 50 applications and they wish to capture support time by application during course of the year. During the course of a week, any application or combination of applications can have support requests, so it is different week to week and not predictable. Essentially we are looking to park the time with appropriate application after the work is complete. We are using Project Server 2007 and have investigated the following: 1. Created a Annual Support workplan with a task per application in Project Pro with the IT group added as Enterprise resourc...

Microsoft Visual C++ Runtime error
Hi, the first time I log into Outlook each day I get "Microsoft Visual C++ Runtime library/Run time error" message pop up. It also states "C:\Programs\Office\Outlook.exe" and the text says "Application required the runtime to terminate it in an unusual way". When you "OK" it then log back in, all is fine. Anyone have any ideas how to rid myself of this annoying feature? Thanks Chris Hi, (I'm on XP), Outlook 2000-SP3 - I figured out when it happens - I have two identities set up on my machine. If one identity has outlook open, then I s...

Error: "Duplicate Record A record of this type with this name already exists"
I have a strange error that started today. (I am Using V1.2) When I try to convert a lead to an account AND a contact I get the following msg: "Duplicate Record A record of this type with this name already exists. Please choose a different name and try again" At the end of the process the program is crating an Account record but not a contact record. If I try to convert the same lead again to a Contact I get the same msg. Converting a lead to an Account or Contact ONLY will work fine. The following is error is registered on the server Application log: Event Type: Error Event Sou...

Help in creating dialog based application
Hi, I am creating a dialog based application which has a main dialog with 3 buttons. 1. Address Book 2. Student List 3. Course List with which i can go to any one of the screens(which is again the dialog). when i click address book button my main dialog should be hidden/closed and i should open the address book dialog which has again some button to navigate back to main dialog/student list/course list. same kind of functionality for other two dialogs(student/course list). i thought of creating all the 3 dialogs as modeless and main dialog as parent but how i will inform the parent window to ...

Trigger error
I have a delete trigger that is trying to get information during the delete using the deleted object and I am getting the errors below. The multi-part identifier "deleted.RepCompanyID" could not be bound. The multi-part identifier "deleted.BrandID" could not be bound. The trigger code giving the error is below. p.s. This is from an old database so alternatives in constraint use would be ok. Thanks. DECLARE @RepCompany varchar(200); DECLARE @Brand nvarchar(50); DECLARE @OldInfo varchar(200); SET @RepCompany = (SELECT RepCompany FROM dbo.Rep...

DLLs being loaded for all applications
I get the following warning at system startup: "Custom dynamic link libraries are being loaded for every application. The system administrator should review the list of libraries to ensure they are related to trusted applications." How do I review the list of libraries and how do I eliminate any that should be removed? ...

No Error Message in XP
Hello, I have a macro that hides some columns based on a selection from a validation list. The original spreadsheet was developed in Excel XP; I created the code in Excel 2000 because at the time I didn't realize the programmer had done the spreadsheet in XP. I ran and checked the macro which was not working, but I did not get an error in XP. I switched over to 2000, ran the macro, got an error, and because of the error message then figured out what was wrong with it. My point to this whole rambling explanation is, does anyone know why I would not get the error in XP? The er...

persistent error for altered or nonexistent line
When I am getting a persistent error (in an imported C header), even when the particular line has been commented out, edited or even removed, where is the error coming from, and how can I flush it? c:\hand in hand\test\vorbisfile.h(27) : fatal error C1083: Cannot open include file: 'codec.h': No such file or directory "Steve Russell" <srussell@removethisinnernet.net> wrote in message news:OKDr%23BFdFHA.2180@TK2MSFTNGP12.phx.gbl... > When I am getting a persistent error (in an imported C header), even when > the particular line has been commented out, edi...

DCOM Error 10009
I have a small peer to peer network. One of the machines (XP Pro SP3) recently started to log DCOM Error 10009 every time Windows boots. There is a failure event for each machine on the network. The text of the message is: DCOM was unable to communicate with the computer COMPUTER NAME using any of the configured protocols. This is the only machine doing this, and as I mentioned it just started a few weeks ago. Nothing has changed or been installed on the system. There is no spyware or Viruses on this machine. I have removed all mapped drives and printers. Does the machi...

CRM 4.0 SETUP ERRORS
Dear all, I tried Installing CRM 4.0 professional edition in my test lab on windows server 2003 sp2, i keep receiving the following errors after folloming the implementation guide step by step: 1.error: verify domain user account SPN for microsoft dynamics CRM ASP.NET application pool account.( I use domain user account with domain admins right for the service account) 2. Error: Index was outside the bound of the array 3: SQL error: an error accured while esterblishing connection to the server, when connecting to SQL server 2005. This failure may be caused by the fact that under defa...

Converting Console Application to win32 application
I have created an MFC console application. When I run it from Windows Explorer it opens a dos box and closes the box when it terminates it logic. Is it possible to convert it so it won't open the dos box - just run without any display? If positive, please help me regarding the steps. Thanks Kalish I am not sure if you can compile MFC with a standard win32 application, but if you can, then you can simply change your main to a WinMain, and you will have the result you want. Create a Win32 Project using the Wizard, and selection Windows Application, to see an example. Remove everthing ...

Passwords on a Form
I have a form that I would like to password protect. I first created a button and then created the password input box through VB. The only probelm I had was, if you hit the cancel button on the Password input box, the input box wouldn't close. I was looping the code until the correct password was entered but not sure that's the best way to go about it. What would be the best way to do this? I would greatly aprreciate it. Thanks! The best way is to apply user level security so that all your users must sign on when they open your database. Then, you can allow users to have ac...

is there a hotel management excel application?
The subject says is all... TIA Martyn Hi Martyn, See response to your thread in Programming. --- Regards, Norman "Cheker" <zoomer@gmail.com> wrote in message news:eNJLsRRqEHA.348@TK2MSFTNGP15.phx.gbl... > The subject says is all... > TIA > Martyn > > > ...

Microsoft Error
I bought a powerbook g4 about 7 months ago along with MS office 2004. When I installed it the first time...I had a bit of trouble because of the test drive thing...then I uninstalled that. MS office went back to working perfectly. Then, literally all of a sudden, I would click a word document off the desktop or try to open MS word program and I get this error message. The error message says "Microsoft Error Reporting....MS Word has encountered a problem...blah blah blah..." So, silly me, I uninstalled it...figuring that maybe I should reinstall later. I did that and to no avail t...

MSMQ ... authenticating application
A number of application stores messages in MSMQ. One of the server application needs to read messages that was created/stored by specific applications not to read all the messages in MSMQ. Is there any workarounds? Thank you Regards Raj "Raj" <Raj@discussions.microsoft.com> wrote in message news:6917708E-88B1-497B-A888-5038ACEA17CE@microsoft.com... >A number of application stores messages in MSMQ. One of the server > application needs to read messages that was created/stored by specific > applications not to read all the messages in MSMQ. > ...

Custom form Authentication
I have an application that I have rolled out at a few different customers. I create a virtual directory under CRM and in the isv.config file I use relative url. Yet in some cases people have to re-authenticate into my pages. These pages are launched from within CRM, so there is no reason to re-authenticate. There is a new patch out there for some IIS error that when applied, the re-authentication just plain doesn't work and none of my users can get in. These seems so basic - so what am I missing!! Thanks! ...

ERROR saving Grid as XML
SCENARIO ======================================= I have a Grid and I want to save the values on an XML. Let me say that I am NOT using DataSet to load valus on my grid. PROBLEM ======================================= When I am saving a Grid to XML I get the following exception: "Token StartElement in state Epilog would result in an invalid XML document" SOURCE CODE ======================================= myXmlTextWriter = new XmlTextWriter (aFileName, null); myXmlTextWriter.Formatting = Formatting.Indented; myXmlTextWriter.WriteStartDocument(); myXmlTextWriter.WriteStartElem...

DLL
Is there any way to detect when an application that is calling my dll is about to be destroyed? I need to close several files if the calling application has not done so, therefore I need to detect when the calling application is about to be destroyed and clean up the files and variables I have used in the dll. You need to implement DllMain, the handle your cleanup tasks when you receive a PROCESS_DETACH notification. Check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_initialize_non.2d.mfc_dlls.asp "Joe Estock" <jestock@NOSPAMnutexto...