Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

[RESOLVED] Invalid Property Value: DTPicker

$
0
0
EDIT FORM
Code:

Private Sub cmdUpdate_Click()
On Error GoTo errupdate
executeQuery "UPDATE Finder SET Owner = '" & txtOwner & "', EmployeeNumber = '" & txtEmployeeNumber & "', Acquiredby = '" & txtAcquiredby & "', IDStatus = '" & cboIDStatus & "', Department = '" & cboDepartment & "', IDCount = '" & cboIDCount & "', ReleaseDate = '" & DTPicker2 & "' Where Basura = '" & txtBasura & "';"
Unload Me
RefreshListview
MsgBox "Record successfully Updated", vbInformation, "Abarro ID Finder"
RefreshListview
Exit Sub:
errupdate:
MsgBox Err.Description, vbExclamation, "Error"
Set FindCon = Nothing
Set FindRs = Nothing
End Sub

Code:

Private Sub form_activate()
FindRecordset "Select * From Finder Where Owner = '" & txtOwner & "';"
If Not FindRs.BOF = True Or FindRs.EOF = True Then
txtOwner.Text = FindRs.Fields("Owner")
txtEmployeeNumber.Text = FindRs.Fields("EmployeeNumber")
txtAcquiredby.Text = FindRs.Fields("Acquiredby")
DTPicker2 = FindRs.Fields("ReleaseDate")
cboIDStatus.Text = FindRs.Fields("IDStatus")
cboDepartment.Text = FindRs.Fields("Department")
cboIDCount.Text = FindRs.Fields("IDCount")
Else
Call RefreshListview
End If
End Sub

Highlighted Code
DTPicker2 = FindRs.Fields("ReleaseDate")

Error
Run-time error '380':
Invalid property value

Screenshot

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>