กระทู้เก่าบอร์ด อ.Yeadram
        
           1,892   3		  
          
					  
		    URL.หัวข้อ / 
		    URL
        
        compact + repair with VBA      
    
      แนะนำการเขียน code
กระชับและซ่อมแซม ฐานข้อมูล ด้วย VBA หน่อยครับ
    
  กระชับและซ่อมแซม ฐานข้อมูล ด้วย VBA หน่อยครับ
				3 Reply in this Topic. Dispaly 1  pages and you are on page number 1 
				
        
    2 @R04662    
        
  
      มันฟ้องตามนี้ครับ
compile error :
Argument not optional
    
  compile error :
Argument not optional
        
    3 @R04666    
        
      
    
  
       Sub CompacMDB()
   Dim dbNam As String
   dbNam = "\KORATORGANIZER.mdb"
   If Dir(CurrentProject.Path & "\h22.mdb") <> "" Then Kill CurrentProject.Path & "\h22.mdb"
    DBEngine.CompactDatabase CurrentProject.Path & dbNam, CurrentProject.Path & "\h22.mdb"
    Kill CurrentProject.Path & dbNam
    DBEngine.CompactDatabase CurrentProject.Path & "\h22.mdb", CurrentProject.Path & dbNam
    If Dir(CurrentProject.Path & "\h22.mdb") <> "" Then Kill CurrentProject.Path & "\h22.mdb"
   End Sub    
      Time: 0.0613s
    
      
		
Access.Application.CompactRepair