Hi to all,
tlkpCategories is a table with the following fields:
pkCategoryId, CategoryName, StartNumber, EndNumber
The StartNumber and EndNumber fields are of Number Data Type
I have a form with two different controls: a text box named txtCallNumberFinal and a combo box named cboCategory with row source tlkpCategories.
Each category name has a corresponding number between StartNumber and EndNumber fields.
My issue is that the user might enter the correct category number but selects the wrong category name in the combo box. So, I want to check that the number used for the text box matches the correct category name.
Example:
category 1 is between StartNumber 100 and EndNumber 199.999
The user input txtCallNumberFinal was 120.256 but he selects Category 6 instead of category 1.
Which is better in a case like this:
1- display an error message to alert the user of his wrong category name choice.
or
2- the program will display the Category name based on the data input number automatically in the combo box.
Note:
The control txtCallNumberFinal is an alpha numeric that starts with numbers and ends with letters. The characters are / alphabets are not important in my case.
So I think the val() function will be used in a case like this to ignore the apphabets.
Any help is appriciated