I'm having a coding issue where I know I am doing something inefficiently. When a field is left blank on my form I want a NULL stored in the SQL table. When a field is NULL in the table I have to deal with it before placing the value in the form fields (I know this one can be accomplished by including double quotes with the field). Right now it seems like I am using far too much code to deal with the NULLs. Can someone point out "the better way"?
Loading Values
If Not IsNull(RSLoadData.Fields("GenderDesc")) Then
cboGender.Text = RSLoadData.Fields("GenderDesc")
End If
Saving Values
If Trim$(txtStreetAddress2.Text) <> "" Then
RSSaveData.Fields("StreetAddress2") = txtStreetAddress2.Text
Else
RSSaveData.Fields("StreetAddress2") = Null
End If