¼ÐÃD:
ddeÂ_½u°ÝÃD?
[¥´¦L¥»¶]
§@ªÌ:
ms2001
®É¶¡:
2010-8-10 20:56
¼ÐÃD:
ddeÂ_½u°ÝÃD?
³sµ²dde®É¡A¦³®É³sµ²ºÝ·í±¼¤F¡A¥i¬OddeÁÙ¦b¶]¡A¸ê®Æ³£¨S¦³§ó·s¡C
·Q½Ð°Ý¦p¦ó¦Û°Ê§PÂ_¸ê®Æ¨S¦³¦b§ó·s¡A¨Ãµo¥X´£¥Ü¡A¨Ò¦p¤T¬í¤º¡A¸ê®Æ¨S¦³§ó°Ê¡A¦Û°Ê´£¿ô¡C©ÎªÌ¦³§ó¦nªº¤èªk?
ÁÂÁÂ~
§@ªÌ:
GBKEE
®É¶¡:
2010-8-11 11:05
¦^´_
1#
ms2001
¨Ï¥Î QueryTable ª«¥ó ªºAfterRefresh ¨Æ¥ó ¸Õ¸Õ¬Ý
Dim MyDee As New Class1
Sub SetfDee()
Set MyDee.QTable = QueryTables(1)
'QueryTable ¤@ӥѥ~³¡¸ê®Æ¨Ó·½©Ò¶Ç¦^¤§¸ê®Æºc¦¨ªº¤u§@ªí¡C
End Sub
Sub MyDeeRefresh()
On Error Resume Next
MyDee.QTable.Refresh 0
'Me.QueryTables(1).Refresh 0 '¤]¥i¥H
End Sub
½Æ»s¥N½X
[attach]2338[/attach]
Option Explicit
Public WithEvents QTable As QueryTable
Private Sub QTable_AfterRefresh(ByVal Success As Boolean)
MsgBox Success '§P§O ¬O§_ §ó·s¦¨¥\
End Sub
Private Sub QTable_BeforeRefresh(Cancel As Boolean)
'MsgBox QTable.Name
End Sub
½Æ»s¥N½X
[attach]2339[/attach]
§@ªÌ:
ms2001
®É¶¡:
2010-8-14 09:15
·PÁª©¥Dªº«ü¾É¡A²Ä¤G¬q¤p§Ì¦³ÂI¬Ý¤£À´C¡A¥i¥HÀ°§Úª`¸Ñ¤@¤U¶Ü¡AÁÙ¦³°£¤Fdde¥~¡A¦pªG¬O¥Îrtd³sµ²ªº¸Ü¤]¦³¥Î¶Ü?ÁÂÁÂ~
§@ªÌ:
GBKEE
®É¶¡:
2010-8-14 10:35
¦^´_
3#
ms2001
Option Explicit '¦b¼Ò²Õ¼h¦¸¤¤±j¢¨CÓ¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
Public WithEvents QTable As QueryTable '
WithEvents
«Å§i¤@Ó§t¦³¨Æ¥óªº Application Ãþ«¬ª«¥ó¡C
Private Sub QTable_AfterRefresh(ByVal Success As Boolean) '
Success
Success As Boolean ¦pªG¬d¸ß¦¨¥\§¹¦¨«h¬°
True
MsgBox Success '§P§O ¬O§_ §ó·s¦¨¥\
End Sub
Private Sub QTable_BeforeRefresh(Cancel As Boolean)
' Cancel
·í¨Æ¥óµo¥Í®É¬°
False
¡C¦pªG¸Ó¨Æ¥óµ{§Ç±N¦¹¤Þ¼Æ(
Cancel
)³]©w¬°
True
¡A«h¸Óµ{§Çµ²§ô«á±N¤£§ó·s¡C
'MsgBox QTable.Name
End Sub
§@ªÌ:
blue2263
®É¶¡:
2019-3-23 07:50
G¤j±z¦n
§Ú°õ¦æSet MyDee.QTable = QueryTables(1) ¦¹¬qµ{¦¡½X·|¥X²{¿ù»~,½Ð±Ð¦p¦ó¸Ñ¨M
[attach]30274[/attach]
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)