RE-Decoded

A technical look at the Raiser’s Edge API from Blackbaud

The Case of the Missing Tabs

July 25th, 2008 by David Zeidman

Here is a strange problem that I encountered. I wanted to show the constituent form with constituent data. I also wanted to know if the user had saved and closed or just closed the form afterwards. If I had not been interested in knowing this information then I would have simply done the following:

Public Sub testing()
  Dim oRec As CRecord
  Set oRec = New CRecord
  oRec.Init SessionContext
  oRec.LoadByField uf_Record_CONSTITUENT_ID, "3"
  Dim ofrmConstit As New CConstituentForm
  ofrmConstit.Init SessionContext
  Set ofrmConstit.ConstituentObject = oRec
 

  ofrmConstit.Show vbModal   ofrmConstit.CloseDown  Set ofrmConstit = Nothing
  oRec.CloseDown

  Set oRec = Nothing
End Sub
This works as expected without any problems. (However if you write the equivalent code in VB.NET you (me only?) do get some strange fonts)

This does now allow us to determine whether or not the user has cancelled so there is a different method that we can use that is very useful:

Public Sub testing()
  Dim oRec As CRecord
  Set oRec = New CRecord
  oRec.Init SessionContext
  oRec.LoadByField uf_Record_CONSTITUENT_ID, "3"
  Dim ofrmConstit As New CConstituentForm
  ofrmConstit.Init SessionContext
  Set ofrmConstit.ConstituentObject = oRec
 

  If ofrmConstit.ShowFormOKCancel() = False Then
     MsgBox "Cancelled"
  End If
  ofrmConstit.CloseDown   Set ofrmConstit = Nothing
  oRec.CloseDown

Set oRec = Nothing
End Sub
Now when the window is opened it is missing certain tabs, as shown below.

Constituent Record with missing tabs

These tabs have one thing in common. They all represent child top level objects on the constituent record e.g. actions, gifts, events, etc. The code does determine whether or not save and close was pressed but clearly there are some tab issues.

Blackbaud are looking into it… Watch this space for updates

Related posts:

  1. VBA User Fields in Export In export for a recurring gift it is not possible...
  2. Fund Missing (Found in an Unexpected Place) I had an error that bugged me for a while...
  3. The case of the disappearing form One of my most long standing problems that I have...

Posted in Intermediate |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.