路径错了,就会提示错误。文件夹如果不存在,也会提示错误。
Dim c As new camera
c.capture() '开始照相
If c.image IsNot Nothing Then '照相成功
With Tables("年审_table1")
If .Position = -1 Then
MessageBox.Show("没有此人请重新查找")
Else
Dim mc As String = .Current("身份证号")
Dim d As Integer
d = Date.Today.Year
Dim f As String = ProjectPath & "Attachments\" & mc & d &".jpg"
c.Save(f)'保存文件
If .Current("照片") = "" Then
.Current("照片") = mc & d & ".jpg"
Else
.Current("照片") = .current("照片") & vbcrlf & mc & d & ".jpg"
End If
End If
End With
End If