I am attempting to see if a user has selected a checkbox and if they did, update two database tables and gray out the checkbox so that it remained checked and cannot be changed on another screen. Here is my code so far:
'Declare variable
dim nsfCheck
'Initialize variable
nsfCheck = False
'=======================
' nsfCheck Flag Function
'=======================
Function nsfCheckFlagChecked(nsfCheck)
'Added by Ty Johnson 12/14/06 to see if nsf check flag checkbox checked
If (nsfCheck = True) Then
nsfCheckFlagChecked = True
Else
nsfCheckFlagChecked = False
End If
End Function
If (nsfCheck = true) Then
If application("ODBC_Oracle") Then
strSQL = strSQL & "UPDATE BadCheckReconciliation (FirstNoticeDate, NSFcheckFlag), " & vbcrlf
strSQL = strSQL & " (SET BadCheckReconciliation_seq.nextval, SQLDate( FeeTransdt ),nsfCheck) " & vbcr
strSQL = strSQL & "UPDATE Journal ( BadCheckReconciliationIdnt) " & vbcrlf
strSQL = strSQL & " FROM BadCheckReconciliation" & vbcrlf
else 'SQL 7.0
strSQL = strSQL & "UPDATE BadCheckReconciliation BCR" & vbcrlf
strSQL = strSQL & "SET FirstNoticeDate = FeeTransdt,NSFcheckFlag = nsfCheck" & vbcrlf
strSQL = strSQL & "UPDATE Journal J" & vbcrlf
strSQL = strSQL & "SET J.BadCheckReconciliationIdnt = BCR.BadCheckReconciliationIdnt" & vbcrlf
StrSQL = strSQL & " FROM BadCheckReconciliation BCR" & vbcrlf
End If
End If
'Declare variable
dim nsfCheck
'Initialize variable
nsfCheck = False
'=======================
' nsfCheck Flag Function
'=======================
Function nsfCheckFlagChecked(nsfCheck)
'Added by Ty Johnson 12/14/06 to see if nsf check flag checkbox checked
If (nsfCheck = True) Then
nsfCheckFlagChecked = True
Else
nsfCheckFlagChecked = False
End If
End Function
If (nsfCheck = true) Then
If application("ODBC_Oracle") Then
strSQL = strSQL & "UPDATE BadCheckReconciliation (FirstNoticeDate, NSFcheckFlag), " & vbcrlf
strSQL = strSQL & " (SET BadCheckReconciliation_seq.nextval, SQLDate( FeeTransdt ),nsfCheck) " & vbcr
strSQL = strSQL & "UPDATE Journal ( BadCheckReconciliationIdnt) " & vbcrlf
strSQL = strSQL & " FROM BadCheckReconciliation" & vbcrlf
else 'SQL 7.0
strSQL = strSQL & "UPDATE BadCheckReconciliation BCR" & vbcrlf
strSQL = strSQL & "SET FirstNoticeDate = FeeTransdt,NSFcheckFlag = nsfCheck" & vbcrlf
strSQL = strSQL & "UPDATE Journal J" & vbcrlf
strSQL = strSQL & "SET J.BadCheckReconciliationIdnt = BCR.BadCheckReconciliationIdnt" & vbcrlf
StrSQL = strSQL & " FROM BadCheckReconciliation BCR" & vbcrlf
End If
End If