ÏÞÖÆÈí¼þÊÔÓôÎÊý¼°Ê±¼ä
ÎÊÌ⣺ÈçºÎдע²á±íÏ޴Σ¿ ÈçºÎͨ¹ýдע²á±íÏÞÖÆÊý¾Ý¿âʹÓÃʱ¼ä£¿±ÈÈ絽ijÄêijÔÂijÈÕ¹ýÆÚ¡£ »Ø´ð£º 'ÔÚÄ£¿éÖмÓÈëÈçÏ´úÂ룬ȻºóÔÙÆô¶¯Ê±ÓÃÃû×ÖΪAutoexecµÄºêÆô¶¯ 'Æäʵ±¾Àý·Ç³£¼òµ¥£¬ÄãֻҪŪ¶® SaveSettingºÍGetSetting¼´¿É '±¾Àý»áÐÞ¸Ä×¢²á±í¡£ Option Compare Database Option Explicit Dim HowMany As String Dim addTimes As Integer Sub Times() '³õʼע²á±í£¬ÔÚ×¢²á±íдÈë¼üÖµ SaveSetting "HerdsboyTimeLimit", "Settings", "Times", "1"
'°ÑÕâ¾ä¸ÄΪдÈëʱ¼ä£¬ÒÔºóͨ¹ýdatediff±È¶Ônow 'ÓëµÚÒ»´ÎдÈëµÄʱ¼ä¾Í¿ÉÒÔ´ïµ½ÏÞÖÆʱ¼äµÄÄ¿µÄ MsgBox "»¶ÓµÚ1´Î³ÌÐòʹÓñ¾³ÌÐò!", , "ͨÓÃÏ޴γÌÐò" End Sub Sub Changetimes() '°Ñ×Ö·ûֵǿÖÆתΪÕûÐÎÖµ HowMany = Cint(GetSetting("HerdsboyTimeLimit", "Settings", "Times")) HowMany = HowMany + 1 'Ôö¼Ó´ÎÊý addTimes = CStr(HowMany) '°Ñ´ÎÊýÖØÐÂתΪ×Ö·û´® 'ÖØдע²á±íÖµ SaveSetting "HerdsboyTimeLimit", "Settings", "Times", addTimes End Sub Function Gettimes() On Error Resume Next '¼ÓÔØ£¬»ñµÃʹÓôÎÊý HowMany = Cint(GetSetting("HerdsboyTimeLimit", "Settings", "Times")) If HowMany = "" Then Call Times 'Èç¹û×¢²á±íûÓиüüÖµ£¬¼ÓÔØдÈë×¢²á±í¹ý³Ì ElseIf HowMany <= 100 Then 'ÅжÏʹÓôÎÊý£¬Ð¡ÓÚ100¼ÌÐøʹÓà MsgBox "ÄãʹÓÃÁË" & HowMany & "´Î±¾³ÌÐò£¡", , "ͨÓÃÏ޴γÌÐò" Call Changetimes '¸Ä±äʹÓôÎÊý DoCmd.OpenForm "form" Exit Function Else MsgBox "ÄãµÚ" & HowMany & "´ÎʹÓÃÁ˱¾³ÌÐò£¬³¬¹ýʹÓôÎÊý£¡", , "ͨÓÃÏ޴γÌÐò" 'ÅжÏʹÓôÎÊý£¬´óÓÚ100¾¯¸æ²¢Í£Ö¹Ê¹Óà DoCmd.Quit End If End Function
--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ
Êý¾Ý¿âÉè¼ÆÖеÄÃô½Ý·½·¨ 2004-2-9 11:19:16
Á½¸öδ¹«¿ªµÄACCESS·½·¨µÄʹÓü¼ÇÉ 2003-12-30 14:59:33
¶Ô×¢²á±í²Ù×÷¼¼ÇÉ-½«³ÌÐòÔÚ¿ª»úʱÔËÐÐ 2003-11-18 9:24:59
ÏÞÖÆÈí¼þ30ÌìÊÔÓà 2003-11-13 10:53:18
ACCESSµÄÊý¾Ý¿â°²È«ÎÊÌâ½â´ð 2003-11-13 10:52:11
³ÌÐò´ò¿ªËٶȻºÂý 2003-10-14 8:29:22
ÈçºÎÇ¿ÖÆ Access ÏÔʾËÄλÊýÄê·ÝµÄÈÕÆÚ 2003-10-10 10:34:21
AccessÆô¶¯ÃüÁîÐÐÑ¡Ïî´óÈ« 2003-10-10 10:02:00
|