|Posted: 08/30/2004, 5:52 PM
Using: vb.net and SQL
I am trying to accomplish the following:
I have a record form and my user selects a value from a Listbox which is connected to my Reason Code table. The bound field is RRID and the text field is Reason_Code. Each reason code has a type, which is also indicated in the Reason code table.
The reason code table has the following fields:
RRID (int, unique)
In the table that the record form is connected to, there is a field called Processing_Status (int). When a user selects a certain reason code, I would like for the Processing_Status to automatically be set to a certain value.
If Reason_Code 1 is selected, then the Processing_Status should be set to 3.
Problem 1: The user has to select the reason code but the database code needs to find the RC_Type that corresponds to the reason code selected.
Problem 2: The database code then needs to set the value of the Processing_Status field.
Here is what I have tried that is not working (vb.net).....
This is in the Before_Show event of the Processing_Status hidden field:
'Control Processing_Status_Code Event BeforeShow. Action Custom Code @82-73254650
If L_FSE_Processing_tblReason_Code.Value is "2" Then
L_FSE_Processing_tblProcessing_Status_Code.Value = 2
Else If L_FSE_Processing_tblReason_Code.Value is "3" Then
L_FSE_Processing_tblProcessing_Status_Code.Value = 4
'End Control Processing_Status_Code Event BeforeShow. Action Custom Code
Keep in mind that the above method does not take into account having the code find the RC_Type based on the reason code that was selected.
Any help will be appreciated. I have tried to be very detailed above but if more information is needed I can provide it.