แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kapiak

หน้า: [1]
1
ผมมือใหม่พึ่งหัดทำโปรแกรมจาก access ขอสอบถามครับ
:dizzy: :dizzy:

2
ห้อง MS Access / การ Export
« เมื่อ: 23 ก.ย. 61 , 14:30:06 »
ถ้าต้องการ Export ออกมาให้เป็บแบบฟอร์มนี้  A,,,,,,,,,,,
L,,,,P จาก query 16 field (คือเอาแต่ field ที่ 1 ที่ 12 ที่ 16 สมมุติข้อมูลเรียงจาก AถีงP) ต้องกำหนดอย่างไรบ้างครับ
คือตอนนี้ EXport ออกมา ข้อมูลออกมาทั้งหมด 16 field

3
ห้อง MS Access / : การ export to text
« เมื่อ: 20 ก.ย. 61 , 00:46:50 »
จากกระทู้นี้ https://www.thai-access.com/yeadram_view.php?topic_id=2878
ที่ อ.Yeadram ตอบ ถ้าผมต้องการให้คง comma ไว้ผมต้องแก้ไขส่วนไหนครับ

ตัวอย่าง ก่อนใส่ code นี้ Export ได้ "A",1234,"B" หลังใส่ Code นี้ได้ A1234B ที่ต้องการคือ A,1234,B  พอจะเห็นภาพไหมครับ

Sub Txxxxxx()
dim conn as new adodb.connection
dim rs as new adodb.recordset
dim sq as string
dim i, j as integer

set conn = currentproject.connecion
rs.open "qryReportTextfile", conn, 1


if not rs.eof then
rs.movelast
rs.movefirst
j = rs.fields.count-1
open "C:\sbank.txt" for output as #1

do while not rs.eof
sq = ""
for i = 0 to j
sq= sq & rs(i)
next

Print #1, sq
rs.movenext
loop
close #1

end if

rs.close
set rs= nothing
set conn = nothing
end sub



หน้า: [1]