Please help with coding

lamha

Registered User.
Local time
Today, 12:55
Joined
Jun 21, 2000
Messages
76
I'm using MS Access 97. Please help me with coding. I think the code should do this:
'SQL1 = frmItem.Item_ID, frmItem_State.Item_Skey, frmItem_State.Item_State,
' and frmTrace_List.Reading_Type_Code
(Item is the main form, Item_State is subform1, and Trace_List is subform2)
'Select Case frmTrace_List.Work_Center
' Case: "CASH"
' SQL2 = Select Trace_Data from table M_CL_READING_DTL,
' Min_Reading, Max_Reading, Avg_Reading, Scale_Multiplier,
' Scale_Offset from table M_CL_READING_MASTER
' WHERE Item_Skey = frmItem_State.Item_Skey
' Item_State = frmItem_State.ITem_State
' Reading_Type_Code = frmTrace_List.Reading_Type_Code

' Call Calculation1()

' Case: "CM*" (anything starts with "CM")
' If frmTrace_List.Reading_Type_Code = "Avg_Flat_Limit_Data" or "Avg_Zone_Limit_Data"
' or "Avg_Sprays_On_Data" Then
' SQL2 = Select Exit_Gauge from table CM_OPER,
' Avg_Flat_Limit_Data from table tblCM_OPER_AVG_FLAT_LIMIT,
' Avg_Zone_Limit_Data from table tblCM_OPER_AVG_ZONE_LIMIT,
' Avg_Sprays_On_Data from table tblM_OPER_AVG_SPRAYS_ON
' WHERE Item_Skey = frmItem_State.Item_Skey
' Item_State = frmItem_State.ITem_State
' Call Calculation2()
' Else if frmTrace_List.Reading_Type_Code = "GA" Then
' SQL2 = the same as SQL2 for "CASH" work center (BUT from table
' M_CM_READING_DTL and table M_CM_READING_MAST)PLUS Readings_Count,
' Scale_Spacing from table M_CM_READING_MAST
' Call Calculation1()
' Else
' SQL2 = the same as SQL2 for "CASH" work center (BUT from table
' M_CM_READING_DTL and table M_CM_READING_MAST)
' Call Calculation1()
' End if

' Case: "TL*" (anything starts with "TL")
' If frmTrace_List.reading_Type_Code = "GA" Then
' SQL2 = the same as SQL2 for "CASH" work center (BUT from table
' M_FIN_READING_DTL and table M_FIN_READING_MAST)PLUS Readings_Count,
' Scale_Spacing from table M_FIN_READING_MAST
' Call Calculation1()
' Else
' SQL2 = the same as SQL2 for "CASH" work center (BUT from table
' M_CM_READING_DTL and table M_CM_READING_MAST)
' Call Calculation1()
' End if

' Case else
' Error msgBox: "There's no such item"
'End Select

'Function Calculation1()
' (Convert Trace_Data and do some calculation by using some of the fields above, then fill in Table3. NOTE: Trace_Data is a long string of characters. After I convert each character, I need a new field in Table3 to display each converted number in column)
' Open report GraphTable3
'End function

'Function Calculation2()
' (fill in table tblFlatTrace after breaking the 3 Avg fields into multiple records)
' Open report FlatTrace
'End function

End Sub
 

Users who are viewing this thread

Back
Top Bottom