reminder error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have a reminder form called "Action Item", but when view it in Form
View it gives the error
"438: Object doesn't support this property or method."
"Error in Form_ActionItem.SetFormCaption"
How to resolve this error. thanks
 
There is no built in method called SetFormCaption so I guess it's a routine
that exists only in your form. Check to see if you can find it, or if not,
step through the code to see where it's being called.
 
Hi, I copied the forms (ActionItem, Reminders) from another database. There
was no error in running the form but when I run the form my database it gives
error. Sometimes it gives errorthat it cannot find the form "formAllrecords"
referred to in macro exression or VB code, and sometimes it gives error that
the object doesn't support this property or method. I've checked the VB code
and it's being called two times in the form.

1.
Private Sub cmdSet_Click()
' Validate that text filled in before saving reminder
' Save the record

On Error GoTo HandleErr

If IsNull(Me!txtTicklerText) Then
MsgBox "Please fill in some reminder text before " _
& "saving your reminder.", , "Can't Save Reminder"
Me!txtTicklerText.SetFocus
Else
Me!ContactID = Forms!formAllrecords!ContactID "this is where its
being called 1st"
DoCmd.RunCommand acCmdSaveRecord
' And prepare to add another record
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
EnableSet
End If
ExitHere:
Exit Sub

HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, vbCritical, _
"Error in Form_ActionItem.cmdSet_Click"
End Select
Resume ExitHere
Resume
End Sub


2.
Private Sub SetFormCaption(strText As String)

On Error GoTo HandleErr
With [Forms]![formAllrecords] "This is where its being called the second
time"
strText = strText & !FirstName & " " & !LastName _
& " - " & !Company.Column(1)
End With
Me.Caption = strText

ExitHere:
Exit Sub

HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, vbCritical, _
"Error in Form_ActionItem.SetFormCaption()"
End Select
Resume ExitHere
Resume
End Sub

I'm stuck on this for days,
can you tell me where is it going wrong. thanks

AJ
 
Hi, I put the following message in the reminders and it works fine when I
start reminders form and does'nt give me errors. Thanks

'On error resume next'


AJ

AJ said:
Hi, I copied the forms (ActionItem, Reminders) from another database. There
was no error in running the form but when I run the form my database it gives
error. Sometimes it gives errorthat it cannot find the form "formAllrecords"
referred to in macro exression or VB code, and sometimes it gives error that
the object doesn't support this property or method. I've checked the VB code
and it's being called two times in the form.

1.
Private Sub cmdSet_Click()
' Validate that text filled in before saving reminder
' Save the record

On Error GoTo HandleErr

If IsNull(Me!txtTicklerText) Then
MsgBox "Please fill in some reminder text before " _
& "saving your reminder.", , "Can't Save Reminder"
Me!txtTicklerText.SetFocus
Else
Me!ContactID = Forms!formAllrecords!ContactID "this is where its
being called 1st"
DoCmd.RunCommand acCmdSaveRecord
' And prepare to add another record
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
EnableSet
End If
ExitHere:
Exit Sub

HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, vbCritical, _
"Error in Form_ActionItem.cmdSet_Click"
End Select
Resume ExitHere
Resume
End Sub


2.
Private Sub SetFormCaption(strText As String)

On Error GoTo HandleErr
With [Forms]![formAllrecords] "This is where its being called the second
time"
strText = strText & !FirstName & " " & !LastName _
& " - " & !Company.Column(1)
End With
Me.Caption = strText

ExitHere:
Exit Sub

HandleErr:
Select Case Err
Case Else
MsgBox Err & ": " & Err.Description, vbCritical, _
"Error in Form_ActionItem.SetFormCaption()"
End Select
Resume ExitHere
Resume
End Sub

I'm stuck on this for days,
can you tell me where is it going wrong. thanks

AJ

JohnFol said:
There is no built in method called SetFormCaption so I guess it's a routine
that exists only in your form. Check to see if you can find it, or if not,
step through the code to see where it's being called.
 
Back
Top