wong_k
asked on
report question
hi all the experts i respect:
i have a question regarding the data reports :
i have a database with the following data:
techno date item repaireddate warranty
t1 2/1/2003 tv 14" 4/1/2003 yes
t2 4/1/2003 tv 14" 5/1/2003 yes
t1 4/1/2003 tv 14" no
t1 5/1/2003 tv 15" 6/1/2003 yes
t1 6/2/2003 tv 16" no
the data reports that i want :
for the month january
techno item in out warranty outstanding
t1 tv 14" 2 1 1 1
tv 15" 1 1 1 0
t2 tv 14" 1 1 1 0
another question is how to detect the date of the month like every end of month the report will generate automatically
how to create this reports ...please help me.thank you very much for your time
i have a question regarding the data reports :
i have a database with the following data:
techno date item repaireddate warranty
t1 2/1/2003 tv 14" 4/1/2003 yes
t2 4/1/2003 tv 14" 5/1/2003 yes
t1 4/1/2003 tv 14" no
t1 5/1/2003 tv 15" 6/1/2003 yes
t1 6/2/2003 tv 16" no
the data reports that i want :
for the month january
techno item in out warranty outstanding
t1 tv 14" 2 1 1 1
tv 15" 1 1 1 0
t2 tv 14" 1 1 1 0
another question is how to detect the date of the month like every end of month the report will generate automatically
how to create this reports ...please help me.thank you very much for your time
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
forgot to say you must use Courier font in order to put the data in formated style
The below codes determine if today is the end of the month
If Format(Date + 1, "d") = 1 Then
'print your report
End If
If Format(Date + 1, "d") = 1 Then
'print your report
End If
ASKER
what i mean is if my data or record at database ....
wong_k:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
Moderator, my recommended disposition is:
Split points between: ryancys and simon780
DanRollins -- EE database cleanup volunteer
Split points between: ryancys and simon780
DanRollins -- EE database cleanup volunteer
you need a picture box and a command button
__________________________
Private Sub Command1_Click()
Dim techno(1 To 5) As String
Dim dat(1 To 5) As Date
Dim item(1 To 5) As String
Dim repairdat(1 To 5) As Date
Dim warranty(1 To 5) As String
Dim colwidth(1 To 5) As Integer
Dim fmt(1 To 5) As String
Dim col(1 To 5) As String
Picture1.Font = "Courier"
col(1) = "techno"
col(2) = "date"
col(3) = "item"
col(4) = "repairdate"
col(5) = "warranty"
colwidth(1) = 6
colwidth(2) = 10
colwidth(3) = 10
colwidth(4) = 12
colwidth(5) = 9
techno(1) = "t1"
dat(1) = "2/1/2003"
item(1) = "tv 14"""
repairdat(1) = "4/1/2003"
warranty(1) = "yes"
techno(2) = "t2"
dat(2) = "4/1/2003"
item(2) = "tv 14"""
repairdat(2) = "5/1/2003"
warranty(2) = "yes"
techno(3) = "t1"
dat(3) = "4/1/2003"
item(3) = "tv 14"""
repairdat(3) = Empty
warranty(3) = "no"
techno(4) = "t1"
dat(4) = "5/1/2003"
item(4) = "tv 15"""
repairdat(4) = "6/1/2003"
warranty(4) = "yes"
techno(5) = "t1"
dat(5) = "6/2/2003"
item(5) = "tv 16"""
repairdat(5) = Empty
warranty(5) = "no"
Picture1.Cls
For i = 1 To 5
For n = 1 To colwidth(i)
fmt(i) = fmt(i) + "@"
Next n
Next i
Picture1.Print Format("techno", fmt(1));
Picture1.Print Format("date", fmt(2));
Picture1.Print Format("item", fmt(3));
Picture1.Print Format("repairdate", fmt(4));
Picture1.Print Format("warranty", fmt(5))
For i = 1 To 5
Picture1.Print Format(techno(i), fmt(1));
Picture1.Print Format(dat(i), fmt(2));
Picture1.Print Format(item(i), fmt(3));
If repairdat(i) = Empty Then
Picture1.Print Format(" ", fmt(4));
Else
Picture1.Print Format(repairdat(i), fmt(4));
End If
Picture1.Print Format(warranty(i), fmt(5));
Picture1.Print Chr(13);
Next i
End Sub