I am trying to add FIPS codes to my county name labels and want to add either one or two zeros to the number unless it is over 100. i'm hoping someone can find the error in my code:
Function FindLabel ([Name], [FIPS]) if ([FIPS] < 10) then FindLabel = [Name] & vbNewLine & FormatNumber (00,[FIPS]) else if (9 < [FIPS] > 100) then FindLabel = [Name] & vbNewLine & FormatNumber (0,[FIPS]) else FindLabel = [Name] & vbNewLine & [FIPS] end if End Function
أكثر...
Function FindLabel ([Name], [FIPS]) if ([FIPS] < 10) then FindLabel = [Name] & vbNewLine & FormatNumber (00,[FIPS]) else if (9 < [FIPS] > 100) then FindLabel = [Name] & vbNewLine & FormatNumber (0,[FIPS]) else FindLabel = [Name] & vbNewLine & [FIPS] end if End Function
أكثر...