Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Loop

Status
Not open for further replies.

anon47

Programmer
Nov 28, 2006
80
US
Ok can anyone give me and example?

Here is what I am trying to do. I need to create an onclick function that will open a table look at the table check the field name letterset if its unchecked then print all the unchecked records?
 
Hi anon,

Please provide more detail.


ATB

Darrylle



Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Why not just have a report with a source query that does that selection? Or just a query like
Code:
Select * from myfile where [myfile].[letterset] = False

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Example One
Somthing like the code below but I need it to loop thru the records till it reaches the end.

Private Sub ProcessAccounts_Click()
stDocName = "Letter"
DoCmd.OpenReport stDocName, acNormal
'--
Me.LetterSent = Checked
DoCmd.GoToRecord , , acNext

'--
End Sub

Example Two
What I also really need is a VBS code that runs out side of any onclick that could open the database print the letter based on a sql statement the check the proper box before it exits the record that way I could put it on a scedualed tast to run at night.

dim conn, rs, sql, intTelephone, intMobile
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=F:\Data.mdb;" & _
"Jet OLEDB:System Database=F:\Secured.mdw", _
"Login", "Password"

sql = "SELECT * FROM [Table1]"
rs.open sql, conn, 3, 3

stDocName = "Letter"
DoCmd.OpenReport stDocName, acNormal
 
Hi Traingamer

It is like that on the form using to process the accounts but I need the click function to check the box as it updates the record
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top