soy mexicanos!!! hablemos de cosas bonitas! jaja
happy new year
"Clifford Bass" <CliffordBass[ at ]discussions.microsoft.com> escribió en el mensaje de noticias:E1038830-7691-4B13-A3B8-90894EDD6979[ at ]microsoft.com...
[Quoted Text] > Hi Annie, > > Your example has only one condition; not the two you originally > mentioned. So I will use that instead of the range that you mention. If > you > really need a range, you will need to adapt as appropriate. Create your > query and report to report on all entries (no Jadcode condition). Then in > code (maybe off of a button) open up a record set that contains all of the > Jadcodes. Loop through that opening, exporting and closing the report for > each Jadcode. This is done by using the where clause in the > DoCmd.OpenReport > command. Untested, you will need to modify as appropriate: > > Dim rstCodes As New ADODB.Recordset > > With rstCodes > .Open "select Jadcode from SomeTableOrQuery", _ > CurrentProject.Connection, adOpenStatic, adLockReadOnly, > adCmdText > Do While Not .EOF > DoCmd.OpenReport "rptTheReport", acViewPreview, , _ > "Jadcode = " & !JadCode, acWindowNormal > DoCmd.OutputTo acOutputReport, "rptTheReport", acFormatSNP, _ > "C:\Temp\TheReport_" & Format$(!JadCode, "00000") & ".snp" > DoCmd.Close acReport, "rptTheReport", acSaveNo > Loop > .Close > End With > > Hope that helps, > > Clifford Bass > > "Annie808" wrote: > >> I have a report based on a query asks for a beginning and ending >> parameter >> (numbers that indicate regions for me). I would like to set this up in a >> function/sql to run automatically, saving each report. >> This is what I started: >> SELECT [join Charter all and Indiv Query].Jadcode >> FROM [join Charter all and Indiv Query] >> WHERE ((([join Charter all and Indiv Query].Jadcode)=11005)); >> >> These Jadcodes run from 11000 to 99999, 541 in total. >> >> Many thanks. >
|