943,634 Members | Top Members by Rank

Ad:
Mar 23rd, 2009
0

Bookmarks

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
dev_kc is offline Offline
35 posts
since Feb 2009
Mar 23rd, 2009
0

Re: Bookmarks

How 'Bout using code tags, and reading the office tutorial?
http://www.daniweb.com/tutorials/tutorial51307.html
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 23rd, 2009
0

Re: Bookmarks

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........
Reputation Points: 10
Solved Threads: 0
Light Poster
dev_kc is offline Offline
35 posts
since Feb 2009
Mar 23rd, 2009
0

Re: Bookmarks

mkay. Have you done a msgbox on rs.RecordCount, to ensure it has the right number of elements? Like, just before the first if?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 23rd, 2009
0

Re: Bookmarks

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.....
Reputation Points: 10
Solved Threads: 0
Light Poster
dev_kc is offline Offline
35 posts
since Feb 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: crystal report printer choose. posible?
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: TXT Read





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC