A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

application defined or object defined error on form



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2010, 06:41 PM posted to microsoft.public.access.forms
klp via AccessMonster.com
external usenet poster
 
Posts: 98
Default 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


ExitHe
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/For...forms/201003/1

  #2  
Old March 15th, 2010, 08:52 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default application defined or object defined error on form

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


ExitHe
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/For...forms/201003/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.