ผมมี file ที่เป็น full path name ต้องการตัด path ทิ้งเอาแค่ชื่อ file และ ext
กระทู้เก่าบอร์ด อ.สุภาพ ไชยา

 216   1
URL.หัวข้อ / URL
ผมมี file ที่เป็น full path name ต้องการตัด path ทิ้งเอาแค่ชื่อ file และ ext

ผมมี file ที่เป็น full path name ต้องการตัด path ทิ้งเอาแค่ชื่อ file และ ext  
เช่น "c:\myproject\test.mdb" จะเอาเฉพาะ "test.mdb" ต้องทำไงดีครับ

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R01426
ถ้าใช้ Access 2000 ขึ้นไปให้ใช้ CurrentProject.Name ครับ ถ้าใช้ Access 97 ต้องใช้ InstrRev() เข้าช่วย ผมได้เขียนโค้ดนี้ไว้ที่ http://www.utteraccess.com/forums/showflat.php?Cat=&Board=access_2000&Number=165963&Forum=All_Forums&Words=TimK&Match=Username&Searchpage=0&Limit=25&Old=allposts&Main=76426&Search=true#Post165963 ลองไปเปิดเข้าไปดู แล้วนำมาใช้อย่างนี้ครับ ? Mid("c:\myproject\test.mdb", InstrRev("c:\myproject\test.mdb","\") +1) test.mdb
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.0443s