Originally Posted by
tagteam
<snip> I have over 100 fields in the form. The user might update 20 fields but wants the rest of them to stay the same.
100 controls??? You have a table with 100 fields?? Doesn't sound normalized....
Originally Posted by
tagteam
<snip>I tried # # and it kind of works. Basically it says " The database didn't update 1 field due to a type conversion failure, blah blah blah" It then clears out the field because it cant read it.
The error is because hash mark "#" is a date delimiter. So you must have been trying to store an invalid date in a text or number type field.
I made an unbound form with 3 unbound controls: "Date1", "Text#" and "Number4".
I used the double click event to run code to clear the text box controls.
Code is
Code:
Option Compare Database
Option Explicit
Private Sub Date1_DblClick(Cancel As Integer)
ClearCntl ("Date1")
End Sub
Private Sub Number4_DblClick(Cancel As Integer)
ClearCntl ("Number4")
End Sub
Private Sub Text3_DblClick(Cancel As Integer)
ClearCntl ("Text3")
End Sub
Public Sub ClearCntl(pCntl As String)
Me.Controls("" & pCntl & "") = Empty
End Sub
By double clicking in a control the data is cleared.