Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 31st, 2008, 1:21 PM   #1
shidayati
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0 shidayati is an unknown quantity at this point
someone plz help me with mh code

vb Syntax (Toggle Plain Text)
  1. Private Sub Label5_Click()
  2. Dim pegang3 As String
  3. If Option2.Value = True Then
  4.  
  5.  
  6. Set General = db.OpenRecordset("select * from GeneralLog WHERE DATE LIKE '*" & Text2.Text & "*'")
  7.  
  8. Text2 = Combo2 & "/" & Combo1 & "/" & Combo3
  9. pegang3 = Combo2 & "/" & Combo1 & "/" & Combo3
  10.  
  11. If Text2 <> "" Then
  12.  
  13.  
  14.  
  15. 'Text2 = rsGeneral.Fields!Date
  16.  
  17. Text2.Text = General.RecordCount
  18.  
  19. frmadmin.txtDate = pegang3
  20.  
  21. If General.RecordCount <> 0 Then
  22. Do While Not General.EOF
  23. If General.Fields!Date = Text2.Text Then
  24. Call loadLV
  25. End If
  26.  
  27. General.MoveNext
  28. Loop
  29.  
  30.  
  31. Else
  32. MsgBox ("Record 0")
  33. End If
  34. End If
  35. End If
  36.  
  37.  
  38. End Sub






""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
i don't what problems with this code..something with their looping and call funtion not work properly.the result no shown like i want and not appear at listview data.

Last edited by big_k105; Mar 31st, 2008 at 3:53 PM.
shidayati is offline   Reply With Quote
Old Mar 31st, 2008, 1:24 PM   #2
Freaky Chris
Hobbyist Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 169
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: someone plz help me with mh code

Is this VBA for Access? Plus could you please use code tags.

im afraid i can't offer much help as i do not know what it is supose to look like, if you could provide a bit more info that would be helpful.

Chris
__________________
Who said i couldn't program
sarcasm = raw_input('Type in a sarcastic remark: ')
print sarcasm
Freaky Chris is offline   Reply With Quote
Old Mar 31st, 2008, 1:40 PM   #3
shidayati
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0 shidayati is an unknown quantity at this point
Re: someone plz help me with mh code

vb Syntax (Toggle Plain Text)
  1. Private Sub Label5_Click()
  2. Dim pegang3 As String
  3.  
  4. """"user click at radio button for enter daily report
  5. If Option2.Value = True Then
  6.  
  7.  
  8. Set General = db.OpenRecordset("select * from GeneralLog WHERE DATE LIKE '*" & Text2.Text & "*'")
  9.  
  10. Text2 = Combo2 & "/" & Combo1 & "/" & Combo3
  11. """" combo1 for dare
  12. '''''''combo2 for month
  13. '''''combo3 for year
  14.  
  15. If Text2 <> "" Then
  16.  
  17.  
  18.  
  19. 'Text2 = rsGeneral.Fields!Date
  20.  
  21. Text2.Text = General.RecordCount
  22.  
  23. '''' check and loop for result
  24.  
  25. If General.RecordCount <> 0 Then
  26. Do While Not General.EOF
  27. If General.Fields!Date = Text2.Text Then
  28. Call loadLV
  29. End If
  30.  
  31. General.MoveNext
  32. Loop
  33.  
  34.  
  35. Else
  36. MsgBox ("Record 0")
  37. End If
  38. End If
  39. End If
  40.  
  41.  
  42. End Sub


''''''''''''''''''''''''''''''''''''
this program is to show daily report for student attendance based on date that enter by teacher......example if 30 student attend class on 28/02/2008..show the result will be shown all names of student.

Last edited by big_k105; Mar 31st, 2008 at 3:54 PM.
shidayati is offline   Reply With Quote
Old Mar 31st, 2008, 5:34 PM   #4
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
Re: someone plz help me with mh code

Is this the full code? what is loadLV?
OpenLoop is offline   Reply With Quote
Old Apr 1st, 2008, 7:21 AM   #5
shidayati
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0 shidayati is an unknown quantity at this point
Re: someone plz help me with my code

vb Syntax (Toggle Plain Text)
  1. ''''call function
  2.  
  3.  
  4. Private Sub loadLV()
  5.  
  6. '''''function in search'''''''''
  7.  
  8. On Error Resume Next
  9. ListView1.ListItems.Clear
  10.  
  11. Do While Not General.EOF
  12. Set items = ListView1.ListItems.Add(, , General.Fields!Log)
  13. 'items.SubItems(1) = rsSTUDENT.Fields!STUDENTNAME
  14. items.SubItems(1) = General.Fields!Date
  15. items.SubItems(2) = General.Fields!ATTENDANCE
  16.  
  17. General.MoveNext
  18. Loop
  19. End Sub

Last edited by big_k105; Apr 1st, 2008 at 10:43 AM. Reason: added Code Tags
shidayati is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incorporating javascript code into java application csrocker101 Java 1 Feb 11th, 2008 6:36 AM
Viewing VB's Automated code john Wesley Visual Basic .NET 3 Jun 8th, 2006 5:37 AM
FTP and return code fetching Serinth C 2 May 28th, 2006 11:05 PM
String to Morse Code - Copying from string to string Xenon C 29 Nov 10th, 2005 2:30 PM
Code suggestions Mad_guy Perl 0 Feb 18th, 2005 10:31 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC