done... cara nya
1. buat report baru
2. bikin text box sebanyak 7 kolom mendatar dan 5 kolom ke bawah ( spt kalender meja )
3. nama text dan label nya harus berurutan spy mudah di looping
4. bikin text box lagi dan di isi dgn current date
5. copy paste function dibawah . dan selesai
inti dari program ini, jadwal kita dapat di lihat dgn mempergunakan ms.access :)
Private Function filldates()
Dim db As Database
Dim rst As Recordset
Dim qry As QueryDef
Dim curday As Variant, curbox As Integer
curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
For curbox = 1 To 83 Step 2 'need to loop thru 42 textboxes
If Weekday(curday) > 1 And Weekday(curday) < 7 Then
Me("Label" & curbox).Caption = Day(curday)
Me("Label" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("Label" & curbox).Visible = True
End If
curday = curday + 1 'nextday
Next curbox
curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
Set db = CurrentDb()
For curbox = 0 To 82 Step 2 'need to loop thru 42 textboxes
If Weekday(curday) > 1 And Weekday(curday) < 7 Then
Set qry = db.QueryDefs("qryKalenderRpt")
qry.Parameters(0) = curday
Set rst = qry.OpenRecordset
If rst.RecordCount > 0 Then
Do While Not rst.EOF()
Me("text" & curbox) = Me("text" & curbox) & rst!ket
rst.MoveNext
Loop
End If
Set qry = Nothing
Set rst = Nothing
Me("text" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("text" & curbox).Visible = True
End If
curday = curday + 1 'nextday
Next curbox
End Function
Private Sub Report_Load()
Me!FirstDate = Date
Call filldates
End Sub
Best regard
Erwin Sugiawan
Dari: sudarsono <jkssbma@yahoo.com>
Kepada: belajar-access@yahoogroups.com
Terkirim: Sel, 26 April, 2011 17:10:59
Judul: [belajar-access] Re: Minta tolong : buat repot spt tanggalan
Coba desain dulu dengan excel agar lebih jelas. dan kirim .
Karena report generator memiliki keterbatasan , jika terpaksa ya pakai excel aja.
Artinya data di export ke excel dan sebagai data link untuk repot
( berupa sheet di fie excel ) .
'======
--- In belajar-access@yahoogroups.com, Erwin Sugiawan <esugiawan@...> wrote:
>
> Dear all,
>
> apakah ada yang pernah membuat report seperti kalendar bulanan ? contoh
> terlampir (seperti tanggalan bulanan di rumah)
> tools : ms.access 2010
> field nya : tanggal , event
>
> tujuan buat repot ini, spy mudah di ingat ataupun di baca oleh user
>
> Best regard
> Erwin Sugiawan
>
------------------------------------
SPAM IS PROHIBITEDYahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/belajar-access/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/belajar-access/join
(Yahoo! ID required)
<*> To change settings via email:
belajar-access-digest@yahoogroups.com
belajar-access-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
belajar-access-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
1. buat report baru
2. bikin text box sebanyak 7 kolom mendatar dan 5 kolom ke bawah ( spt kalender meja )
3. nama text dan label nya harus berurutan spy mudah di looping
4. bikin text box lagi dan di isi dgn current date
5. copy paste function dibawah . dan selesai
inti dari program ini, jadwal kita dapat di lihat dgn mempergunakan ms.access :)
Private Function filldates()
Dim db As Database
Dim rst As Recordset
Dim qry As QueryDef
Dim curday As Variant, curbox As Integer
curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
For curbox = 1 To 83 Step 2 'need to loop thru 42 textboxes
If Weekday(curday) > 1 And Weekday(curday) < 7 Then
Me("Label" & curbox).Caption = Day(curday)
Me("Label" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("Label" & curbox).Visible = True
End If
curday = curday + 1 'nextday
Next curbox
curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
Set db = CurrentDb()
For curbox = 0 To 82 Step 2 'need to loop thru 42 textboxes
If Weekday(curday) > 1 And Weekday(curday) < 7 Then
Set qry = db.QueryDefs("qryKalenderRpt")
qry.Parameters(0) = curday
Set rst = qry.OpenRecordset
If rst.RecordCount > 0 Then
Do While Not rst.EOF()
Me("text" & curbox) = Me("text" & curbox) & rst!ket
rst.MoveNext
Loop
End If
Set qry = Nothing
Set rst = Nothing
Me("text" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("text" & curbox).Visible = True
End If
curday = curday + 1 'nextday
Next curbox
End Function
Private Sub Report_Load()
Me!FirstDate = Date
Call filldates
End Sub
Erwin Sugiawan
Dari: sudarsono <jkssbma@yahoo.com>
Kepada: belajar-access@yahoogroups.com
Terkirim: Sel, 26 April, 2011 17:10:59
Judul: [belajar-access] Re: Minta tolong : buat repot spt tanggalan
Coba desain dulu dengan excel agar lebih jelas. dan kirim .
Karena report generator memiliki keterbatasan , jika terpaksa ya pakai excel aja.
Artinya data di export ke excel dan sebagai data link untuk repot
( berupa sheet di fie excel ) .
'======
--- In belajar-access@yahoogroups.com, Erwin Sugiawan <esugiawan@...> wrote:
>
> Dear all,
>
> apakah ada yang pernah membuat report seperti kalendar bulanan ? contoh
> terlampir (seperti tanggalan bulanan di rumah)
> tools : ms.access 2010
> field nya : tanggal , event
>
> tujuan buat repot ini, spy mudah di ingat ataupun di baca oleh user
>
> Best regard
> Erwin Sugiawan
>
------------------------------------
SPAM IS PROHIBITEDYahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/belajar-access/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/belajar-access/join
(Yahoo! ID required)
<*> To change settings via email:
belajar-access-digest@yahoogroups.com
belajar-access-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
belajar-access-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
__._,_.___
No comments:
Post a Comment