silentwolf
Active member
- Local time
- Yesterday, 23:28
- Joined
- Jun 12, 2009
- Messages
- 565
Hi guys,
got stuck again
I try with this code below to update a field called [Telefon Firma] with a custom function Calleds Clean_PhoneNumber
However when the field is empty I get an error Null not allowed or something down that line as it is in german. Sorry not sure what it is exactly in Access Terms.
I modified that code from CJ London I believe it was.
How to I need to change that line of code so it workes with the Nz Function?
Thanks for any help!
Cheers
Albert
got stuck again
I try with this code below to update a field called [Telefon Firma] with a custom function Calleds Clean_PhoneNumber
However when the field is empty I get an error Null not allowed or something down that line as it is in german. Sorry not sure what it is exactly in Access Terms.
I modified that code from CJ London I believe it was.
Sub TestPhoneNumberUpdate()
Dim rst As dao.Recordset
Set rst = CurrentDb.OpenRecordset("qryContactEmails", dbOpenDynaset)
With rst
Do While Not .EOF
.Edit
![Telefon Firma] = Nz(Clean_PhoneNumber(![Telefon Firma]), "")
.Update
.MoveNext
Loop
.Close
End With
Beep
MsgBox "done", vbInformation
End Sub
the issue is in the ![Telefon Firma] = Nz(Clean_PhoneNumber(![Telefon Firma]), "")
How to I need to change that line of code so it workes with the Nz Function?
Thanks for any help!
Cheers
Albert