数据库高手和斑猪(曾经帮我解决过很多问题的人)请进!
rsData.MoveFirst ' Move to the first record in the Recordset ojbect.
Do While Not rsData.EOF ' Loops until the Recordset is at end. (EOF = End Of File)
If LCase(rsData.Fields(0).Value) = LCase(txtSearchFor.Text) Then ' First we need to find the record we are going to change
' Its the right record
rsData.Edit ' Set the Recordset object in Edit mode.
rsData.Fields(1).Value = txtPhone.Text ' Set Row 1 data from txtPhone.text
rsData.Fields(2).Value = txtHome.Text ' Set Row 2 data from txtHome.text
If chkWorking.Value = Checked = True Then ' Set Row 3 true or false
rsData.Fields(3).Value = True
Else
rsData.Fields(3).Value = False
End If
'When we are done changing the record we need to update it.
rsData.Update
如果我要更新的记录不填写~就会出现不能写入0长度字符的提示,可是我必须让使用者有选择,不填也可以~在数据库的表格中也为空!该怎么做?