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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|