<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_Empty |
Declare Function sx_Empty Lib "Apollo9.dll"
(ByVal cpFieldName As String)
As Integer
BOOL FAR PASCAL sx_Empty
(BYTEP cpFieldName);
Determines whether or not the named field is empty.
cpFieldName: The name of the field.
True if the field contents are empty, and False if not. Character and date fields are considered empty if they consist of spaces. Numeric fields are empty if they evaluate to zero. Logical fields are empty if they evaluate as False. Memo fields are empty if the memo block reference evaluates to zero.
Sub Brw1_Change (nRowCol As Integer)
' whenever rec no changes, dynamically display memo & details
If nRowCol <> BRW_CHANGE_COL Then
If sx_Empty("notes") Then
tMemo.Text = ""
Else
tMemo.Text = sx_GetMemo("notes", 0)
End If
tLast.Text = sx_GetTrimString("last")
tCity.Text = sx_GetTrimString("city")
tCountry.Text = sx_GetTrimString("country")
tPhone.Text = sx_GetTrimString("ph_voice")
End If
End Sub
void CNamesForm::OnChangeSdeb1(UINT, int, CWnd*, LPVOID lpParams)
{
SHORT iRowCol = AFX_NUM_EVENTPARAM(short, lpParams);
if (iRowCol != BRW_CHANGE_COL)
{
if (sx_Empty("notes"))
m_memo->SetStrProperty("Text", "");
else
m_memo->SetStrProperty("Text", sx_GetMemo("notes", 0));
}
}