Thread Solved

Join Date: Feb 2009
Posts: 35
Reputation: dev_kc is an unknown quantity at this point 
Solved Threads: 0
dev_kc dev_kc is offline Offline
Light Poster

Bookmarks

 
0
  #1
Mar 23rd, 2009
How can i print values on the word document from access table,there are more than 1 records for a single person
Here recordcount holds 4 values,bt it is not beng printed on the word doc,it is coming out of the procedure
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. If rs.RecordCount <> 0 Then
  2. If Not IsNull(rs!Name) Then
  3. WordDocument.Edit "Nm"
  4. strEntr = rs!Name
  5. strEntr = AppWord.set_Mixcase(strEntr)
  6. WordDocument.Insert strEntr
  7. End If
  8. If Not IsNull(rs!BANK) Then
  9. WordDocument.Edit "BnkNm"
  10. strEntr = rs!BANK
  11. strEntr = AppWord.set_Mixcase(strEntr)
  12. WordDocument.Insert strEntr
  13. End If
  14. End If
Please help
Last edited by Ancient Dragon; Mar 23rd, 2009 at 8:22 am. Reason: add code tags
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Bookmarks

 
0
  #2
Mar 23rd, 2009
How 'Bout using code tags, and reading the office tutorial?
http://www.daniweb.com/tutorials/tutorial51307.html
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 35
Reputation: dev_kc is an unknown quantity at this point 
Solved Threads: 0
dev_kc dev_kc is offline Offline
Light Poster

Re: Bookmarks

 
0
  #3
Mar 23rd, 2009
Coz that doesnt help,my word document is opening properly,n current date bookmark is working jst fine,i m not able to print values from table,bt from text box its working fine.It is jst goin in 1 if condtn n leaving rest of them,so thats the main prob........
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Bookmarks

 
0
  #4
Mar 23rd, 2009
mkay. Have you done a msgbox on rs.RecordCount, to ensure it has the right number of elements? Like, just before the first if?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 35
Reputation: dev_kc is an unknown quantity at this point 
Solved Threads: 0
dev_kc dev_kc is offline Offline
Light Poster

Re: Bookmarks

 
0
  #5
Mar 23rd, 2009
yes rs.recordcount is correct,bt at this line,it is comin out of the procedure
strEntr = AppWord.set_Mixcase(strEntr)
although strEntr is holding the correct value
It is not going to Mixcase procedure,bt whn i am using textbox,values are being printed just fine.This is the code I used for textbox:
If txtName.Text <> "" Then
WordDocument.Edit "Nm"
Selection.Text = txtName.Text
strEntr = Selection.Text
strEntr = AppWord.set_Mixcase(strEntr)
WordDocument.Insert strEntr
End If

Please help,how can i print all the values which are there in the table corresponding to the PSno.....
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC