#133807 - 2005-02-15 04:15 PM
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
Starting to like KiXtart
Registered: 2000-12-01
Posts: 102
Loc: Denver Colorado
|
Quote:
Well... maybe you need to explain yourself better cuz I am not sure I understand.
The value of 00004 was known to you before you converted it to a string by padding with zeros so you should already know its value. Otherwwise, you can use Val() to get it again.
I am terrible at explaining so let me give it another go 
Looking at the first post, the code runs through the recordset. In the process it parses the record and we then look at the numeric piece Code:
Right($record1,5) Next we use the if statement to find the high number when the records are being run. I don't really know what the record information is except a bunch of numbers. When we built the database, it was populated with all of our workstations old names and they were assigned new names. The script is looking at this database to get the new name. The problem I found was the new name of approximately 200 "unknown old name" computer need a different naming convention and have to start at 00001. So, what I am attempting to do is to avoid creating a new record for the existing workstation entry. First, we identify the workstation and then we give it the proper prefix and then we have to give it the numeric value. We know that some computer names have been assigned with a number like 00005. Using the script as it shows in the first post, the next assigned number will be 00006. While this is a true statement, we want it to be assigned to the first free number (hypothetical) of 00004. So, I have been trying to figure out how to capture the low free number and high free number. If the low number exists or matches the high number, use it. I hope this helps a little...
_________________________
John LM Contractor One of the 2 dads
|
Top
|
|
|
|
Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-15 10:24 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Radimus
|
2005-02-15 10:45 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Radimus
|
2005-02-15 11:09 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Richard H.
|
2005-02-15 11:13 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-15 11:43 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-15 03:53 PM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Richard H.
|
2005-02-15 04:16 PM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-16 08:48 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Sealeopard
|
2005-02-16 12:37 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-16 08:51 AM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
Les
|
2005-02-15 04:01 PM
|
Re: Renaming workstation, need 5 digit placeholder and a case switch?
|
jechilt
|
2005-02-15 04:15 PM
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 388 anonymous users online.
|
|
|