用代码关闭所有窗体
dim intx as integer
dim intCount as integer
intCount = Forms.count-1
for intX= intCount to 0 step -1
docmd.close acform,forms(intX).name
next
或
for intX= intCount to 0 step -1
if forms(intX).Name <> "MyFormToKeepOpen" then
docmd.close acform,forms(intX).name
end if
next intx
Access软件网交流QQ群(群号:198465573) |