开发者

Access 2000 automaticly add text to a form entry field

I have an Access 2000 database with a custom form. People are entering info into this. On one of the fields I want to automatically a开发者_StackOverflowppend a ".zip" to one of the fields.

How?


Assuming you have a textBox called txtFileName, then you can use its AfterUpdate event to do this:

Private Sub txtFileName_AfterUpdate()
    If Not IsNull(txtFileName) Then
        txtFileName = Trim$(txtFileName)
        If Not Right$(txtFileName, 4) = ".zip" Then
            txtFileName = txtFileName & ".zip"
        End If
    End If
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜