M
mscertified
hI've tried everyting and have just about given up. Have printed out help but
it does not say how to program this.
This is what I have tried, I'm getting really weird results like part of a
date/time field and sometimes a literal string in the result, If I code a
normal format it works ok but not with a custom format:
' Set format of number
Dim strQ1 As String, strQ2 As String, strF As String
strQ1 = """"
strQ2 = """" & """"
Select Case Me!Format
Case "C"
strF = "Currency;(Currency);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
Case "P"
strF = "Percent;(Percent);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
Case "N"
strF = "Standard;(Standard);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
End Select
' Set number decimal places
Me!PimaDual.DecimalPlaces = Me!DP
Me!PinalDual.DecimalPlaces = Me!DP
Me!YavapaiDual.DecimalPlaces = Me!DP
Me!MaricopaDual.DecimalPlaces = Me!DP
Me!PimaNonDual.DecimalPlaces = Me!DP
Me!PinalNonDual.DecimalPlaces = Me!DP
Me!YavapaiNonDual.DecimalPlaces = Me!DP
Me!MaricopaNonDual.DecimalPlaces = Me!DP
it does not say how to program this.
This is what I have tried, I'm getting really weird results like part of a
date/time field and sometimes a literal string in the result, If I code a
normal format it works ok but not with a custom format:
' Set format of number
Dim strQ1 As String, strQ2 As String, strF As String
strQ1 = """"
strQ2 = """" & """"
Select Case Me!Format
Case "C"
strF = "Currency;(Currency);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
Case "P"
strF = "Percent;(Percent);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
Case "N"
strF = "Standard;(Standard);" & strQ2 & ";" & strQ2
Me!PimaDual.Format = strF
Me!PinalDual.Format = strF
Me!YavapaiDual.Format = strF
Me!MaricopaDual.Format = strF
Me!PimaNonDual.Format = strF
Me!PinalNonDual.Format = strF
Me!YavapaiNonDual.Format = strF
Me!MaricopaNonDual.Format = strF
End Select
' Set number decimal places
Me!PimaDual.DecimalPlaces = Me!DP
Me!PinalDual.DecimalPlaces = Me!DP
Me!YavapaiDual.DecimalPlaces = Me!DP
Me!MaricopaDual.DecimalPlaces = Me!DP
Me!PimaNonDual.DecimalPlaces = Me!DP
Me!PinalNonDual.DecimalPlaces = Me!DP
Me!YavapaiNonDual.DecimalPlaces = Me!DP
Me!MaricopaNonDual.DecimalPlaces = Me!DP