建表名为yhcscsb,启动窗体名为yhcwgl, 文本框为cscs窗体代码如下:
Private Sub Form_Open(Cancel As Integer)
Dim css As Long
css = Dmax("cscs", "yhcscsb")
DoCmd.GoToRecord acForm, "yhcwgl", acNewRec
If css < 50 Then
cscs = css + 1
DoCmd.Close
MsgBox "感谢使用《银河财务管理 1.01》免费测试版!" & vbCrLf & _
"提示:在注册前,您还有" & 49 - css & "次可以使用!" & vbCrLf & _
" 请您尽快注册! " & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbCrLf & _
" 欢迎您访问立文工作室" & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbCrLf & _
" 联系人:于立文" & vbCrLf & _
" 电话:0454-2922221 13945431870" & vbCrLf & _
" gfuuyygy@163.com gfuuyygy@msn.com" & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", vbOKOnly
Else
DoCmd.Close
MsgBox "您的试用期已过,请您注册!" & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbCrLf & _
" 欢迎您访问立文工作室" & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbCrLf & _
" 联系人:于立文" & vbCrLf & _
" gfuuyygy@163.com " & vbCrLf & _
" " & vbCrLf & _
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", vbOKOnly
DoCmd.Quit
End If
End Sub