It would help to see an example of a file name. But try this
****Untested****
Code:
Private Sub btnFileName_Click()
'Generates file name based on data in the generator.
'Declare variables.
dim sFileName as string
Dim PolNum As String
Dim EndNum As Byte
Dim EffDate As Date
Dim desc1 As String
Dim desc2 As String
Dim desc3 As String
Dim desc4 As String
Dim desc5 As String
PolNum = Forms!frmFileName!ctlPolNum
EndNum = Forms!frmFileName!ctlEndNum
EffDate = Forms!frmFileName!ctlPolEffDt
desc1 = Forms!frmFileName!ctlDesc1
desc2 = Forms!frmFileName!ctlDesc2
desc3 = Forms!frmFileName!ctlDesc3
desc4 = Forms!frmFileName!ctlDesc4
desc5 = Forms!frmFileName!ctlDesc5
' policynumber(space)(space)endorsementnumber(space) (space)effectivedate(space)(space)descriptions
sFileName = PolNum & " " & EndNum & " " & Format(EffDate, "YYYY.MM.DD") & " " & desc1 & desc2 & desc3 & desc4 & desc5
Me.TextBoxName = sFileName
End Sub
Tell your boss (or show her this) that having spaces in names is not good practice. If you MUST have separation between parts of the name, use the underscore:
sFileName = PolNum & "__" & EndNum & "__" & Format(EffDate, "YYYY, MM, DD") & "__" & desc1 & desc2 & desc3 & desc4 & desc5
Much easier name to work with!
If this is going to be a computer file name, the dots in the date are going to also be a problem. I'm just saying...........