Scroll to top of form when active
กระทู้เก่าบอร์ด อ.สุภาพ ไชยา

 200   1
URL.หัวข้อ / URL
Scroll to top of form when active

ถามไว้ที่ 
http://www.utteraccess.com/forums/showflat.php?Cat=&Board=access_97&Number=110075&page=0&view=collapsed&sb=5&o=7&fpart=1&vc=1&PHPSESSID= 
 
ดังนี้ 
I've had a search for this but nothing quite matches my problem.  
 
I have a search form that filters the underlying main form. This main form is  
several screens tall and has a button on the footer to bring up the search form  
again. If a user has scrolled down, then searches again, upon return to the main  
form the view is where they left it i.e. half way down the form. Is there a way to  
force the view to the top of the form?  
 
เขามีฟอร์มไว้สำหรับ Search ข้อมูล โดยรับค่าจากอีกตารางหนึ่ง จึงได้เปิดทั้ง 2 ฟอร์มไว้พร้อมกันเลย ปัญหาจะเกิดเมื่อ ถ้าผู้ใช้ค้นครั้งที่ 2 และก่อนจะค้นได้ใช้ Scroll Bar เลื่อนไปอยู่ตรงกลางหรือด้านล่างของฟอร์ม เมื่อกลับไปใส่ข้อความที่ต้องการค้นหาใหม่ แล้วกลับมา ฟอร์มที่แสดงข้อมูลนั้นจะยังคงแสดงข้อมูลอยู่ด้านล่างของฟอร์มอยู่ 
ทำอย่างไรให้มันวิ่งมาอยู่ข้างบน
 
 
ผมได้แนะนำเขาไป โดยการใช้ SetFocus ของ Control ที่อยู่ด้านบนสุดของฟอร์ม โดยให้ใส่ในเหตุการณ์ On Active  
 
เขาบอกว่ายังไม่ได้ผล ผมเลยให้เขาแนบไฟล์ไว้ ลองไปเอามาดูที่ http://www.utteraccess.com/forums/uploads/109992-Pedders.zip 
 
แล้วเข้าไปดูว่าผมแนะนำเขาให้แก้โค้ดตรงไหนอีก ลองดูครับ

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

1 @R06535
   
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.0470s