manter 发表于:2008-07-04 11:09:18
如何让ACCESS做的软件实现30天使用限制???
Private Sub FORM_Load()
Dim dd As String
dd = CurrentProject.Path
If Right(dd, 1) <> "\" Then dd = dd & "\"
ShowFileAccessInfo dd & CurrentProject.Name
End Sub
Sub ShowFileAccessInfo(filespec)
Dim fs, f, s, aa, bb, cc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
aa = f.DateCreated '建立日期
bb = f.DateLastAccessed '最后访问日期
cc = f.DateLastModified '最后更新日期
If aa > bb Then GoTo ww:
If aa > cc Then GoTo ww:
If bb > cc Then GoTo ww:
If cc > Date Then GoTo ww:
Exit Sub
ww:
MsgBox "请不要修改系统日期!": Quit
End Sub
哪个高人帮我解释下怎么用啊????????
假如你在2008-6-1给用户使用软件,允许其使用到6-31,那么可以写:
if date-"2008-6-1">30 then
MsgBox "试用期天数已到"
Quit
end if
上面写错了,日期要用#号
if date-#2008-6-1# >30 then
MsgBox "试用期天数已到"
Quit
end if
总记录:3篇 页次:1/1 9 1 :