J
John Thomas
I have got the following module to convert dates within a
field:
Function Change_date16()
Dim wait As Database, rbk As Recordset
Set wait = DBEngine.Workspaces(0).Databases(0)
Set rbk = wait.OpenRecordset("OP WL CMDS (RBK02)")
rbk.MoveFirst
While Not rbk.EOF
LastDNAdate = Right$(rbk![LastDNAdate], 4) & Mid$(rbk!
[LastDNAdate], 3, 2) & Left$(rbk![LastDNAdate], 2)
rbk.Edit
rbk![LastDNAdate] = LastDNAdate
rbk.Update
rbk.MoveNext
Wend
End Function
The only problem is when I run this I get the following
run time error message:
Run Time Error '94':
Invalid Use of Null
I know the problem relates to there being no data in the
field but how do I get around this and run the module
successfully?
field:
Function Change_date16()
Dim wait As Database, rbk As Recordset
Set wait = DBEngine.Workspaces(0).Databases(0)
Set rbk = wait.OpenRecordset("OP WL CMDS (RBK02)")
rbk.MoveFirst
While Not rbk.EOF
LastDNAdate = Right$(rbk![LastDNAdate], 4) & Mid$(rbk!
[LastDNAdate], 3, 2) & Left$(rbk![LastDNAdate], 2)
rbk.Edit
rbk![LastDNAdate] = LastDNAdate
rbk.Update
rbk.MoveNext
Wend
End Function
The only problem is when I run this I get the following
run time error message:
Run Time Error '94':
Invalid Use of Null
I know the problem relates to there being no data in the
field but how do I get around this and run the module
successfully?