
// Display Aisle name on the form title.
Form.Title = String.ToUppercase(strTemp)
Note:
This expression was used to display the Aisle name in all-caps on the form title.
strTemp – a form variable that contains the title of the form.
Link this expression to the Action – Open property of the form.
IF String.Length(edtCustNum) == 5
{
// Enter code to check if CustNum exists.
// Code to open the Customer Details form.
}
Note:
edtCustNum – a form control that contains the customer number which should only have a length of 5.
Link this expression to the Action – Text Change property of edtCustNum.
This is a good way to automatically open a form or set focus on a control when a given input has a specific length requirement.
lvSearch.QSearchByKeyword.pKeyword = "%" & String.Trim(edtKeyword) & "%"
lvSearch.Refresh()
Note:
edtKeyword – a form control that accepts a keyword to search.
% - an SQL string delimiter.
tempValue = DATE_ENTERED
intDay = String.Left(tempValue, 2)
strMonth = String.Mid(tempValue, 3, 3)
intYear = String.Right(tempValue, 4)
cbMonthMap = String.ToUppercase(strMonth)
intDay = Number.ToInteger(intDay)
intMonth = cbMonthMap.GetSelection()
intYear = Number.ToInteger(intYear)
dtDateTime = DateTime.CreateDate(intYear, intMonth, intDay)
Note:
DATE_ENTERED – a string column but saves a date value in “dd-MMM-yyyy” format.
tempValue – a form variable that contains the DATE_ENTERED value.
Since you already know what the date string format is, you can use the String Object methods to obtain the day, month and year.
cbMonthMap – is a combobox that contains the list of months in order. This is a reference for the equivalent integer value of the month.
Link this expression when loading the value of DATE_ENTERED to dtDateTime.
This expression will convert the string date to an equivalent format that can be displayed on a dateTime control.