O'Connor, Patricia (OTDA)
Patricia.O'Connor at otda.state.ny.us
Fri Aug 24 10:47:23 CDT 2007
When I try to undo a control the original text does not display in the control on the form. I have even tried to repaint the form but that doesn't help.. Also if the person does select another file - the new file name will not show up on form even after the AFTER_UPDATE Thanks ************************************************** * Patricia O'Connor * Associate Computer Programmer Analyst * OTDA - BDMA * (W) mailto:Patricia.O'Connor at otda.state.ny.us * (w) mailto:aa1160 at nysemail.state.ny.us ************************************************** Private Sub strFileNm_BeforeUpdate(Cancel As Integer) Dim myPath As String strFilter = "Rpt Files(*Bic*.txt; *.txt)" & vbNullChar & "*RPT*.txt;*.TXT;*.DOC;*.XLS" myPath = strFileNm If IsNull(strFileNm.text) Or strFileNm.text = "" Then GoTo strFileNm_BeforeUpdate_GetFile ElseIf Not (Len(Dir$(myPath)) > 0) Then If MsgBox("This file not found " & vbLf & strFileNm & vbLf & _ "Do you want to Search?", vbYesNo, "RPT File Name") = vbYES Then GoTo strFileNm_BeforeUpdate_GetFile Else Cancel = True 'Me.strFileNm.Undo 'Tried both these 'Me!strFileNm.Undo strFileNm.Undo Me.Repaint 'added this - still does not show original value Exit Sub End If End If Exit Sub strFileNm_BeforeUpdate_GetFile: myPath = tsGetFileFromUser(, gstrPPathFTP, strFilter, , "txt", , "RPT Import Files", True) If IsNull(myPath) Then Cancel = True Me.strFileNm.Undo Exit Sub End If End Sub -------------------------------------------------------- This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.