Nomad9
Jan 24 2007, 11:01 AM
Hi,
I have a CSV file that has a large number of lines, one element in each is a full IP address (eg 123.123.123.123). I want to import this data in to an access table but I only need the first two sets of numbers of the IP address. I don't want to have to manually edit each record - so is it therefore possible to create a validation rule to remove the bits I don't want at the time of the import or is there a way to triming the data afterwards.
Any answers would be much appreciated.
Regards - Nomad9
niesz
Jan 24 2007, 11:06 AM
I *think* this will work:
Left("123.123.123.123", InStr(InStr("123.123.123.123", ".") + 1, "123.123.123.123", ".") - 1)
Just replace all the 123's along with their quotes with your fieldname.
Nomad9
Jan 24 2007, 11:19 AM
Hi Niesz,
Thanks for the quick response but when replacing the "123.123.123.123" with the field name IP the rule is not acceptable, saying it is too complicated and it should be simplified with variables. It also inserts quotes around the field name again!
Any suggestions?
Cheers - Nomad9
niesz
Jan 24 2007, 11:25 AM
You probably have to manually add the square brackets...
Left([YourFieldName], InStr(InStr([YourFieldName], ".") + 1, [YourFieldName], ".") - 1)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.