Private Sub cmdChange_Click()
If GetNewName(Text1.Text) <> "" Then
Name strOldDatabase As GetNewName(Text1.Text)
Else
Msgbox "Please enter a new name"
End If
End Sub
Public Function GetNewName(ByVal strName As String) As String
If Len(strName) > 0 Then
' add other logic here to check for valid path,
' valid extension, etc.
GetNewName = "C:\" & strName & ".mdb"
Else
GetNewName = ""
End If
End Function