Jump to content

This topic is 8348 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a db with designs broken down into increments of 500. I need to be able to calculate the path to the file from it design number. i.e. Design 1050 is z:10001050.jpg, design 5900 is z:55005900.jpg, etc.

I started out with if-then script steps to calculate the path, but as the number of images grows and I make mods to the db, it's a real pain to change all of the scripts.

Anyone have a calculation or simple way of finding the right number?

Posted

You can do this using the integer calculation. The final result for your example, using the number field "Design_Number" as the input, would be

code:


Design_Path="z:" & NumToText(500*Int(Design_Number/500)) & "" & NumToText(Design_Number) & ".jpg"

Russ Baker

This topic is 8348 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.