Sorry, but VBA doesn't support working with regular expressions. However, http://www.aivosto.com/index.html has a module RegExpr for VB you can buy for $99 (single developer license). If you don't like that, code a checkIP-function in VB yourself.
And sorry again, usually we don't provide code here. You'll find it very instructive to do this yourself or find it somewhere on the net.
How do I enter a regular expression in MS Access?
Also, what expression needs to be used to ensure that IP addresses entered are valid?