I do not have a problem with the date part, the problem is that I cannot loop through the recordset. If I try to uspdate all the fields where it is null, it will update all the fields with the date and then non of them anull; so now they all have the same date and it si done. I need a was to go record buy record and do this. here is th ecode that I wm trying to do something with:
Code:
StrSQL = ""
StrSQL = "SELECT BdgID From tblBudget_Import_File"
rs1.Open StrSQL, cn
rs1.MoveFirst
While Not rs1.EOF
StrSQL = ""
st = InStr(Now, "M")
stn = CStr(CInt(st - 2))
St1 = CStr(Mid(Now, 1, stn))
St1 = "1118201104701" 'an example of a date that I wouid use
StrSQL = "Update tblBudget_Import_File Set BdgID = '" & St1 & "' Where ISNull(Id) "
cn.Execute StrSQL
DoEvents
rs1.MoveNext
Wend
Thank you