473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Supress Prompts



Hey,

Is there any way to turn off the query parm prompts? I have a report
that must be printed for 53 different cities and the vba code loops
thru a table and passes the value to a select query. All works well
EXCEPT I see the Query Paramater dialogue box show. Any way to not
show this?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
2 2051
On 04 Nov 2003 16:31:57 GMT in comp.databases.ms-access, Sal Cifone
<sa**************@adp.com> wrote:


Hey,

Is there any way to turn off the query parm prompts? I have a report
that must be printed for 53 different cities and the vba code loops
thru a table and passes the value to a select query. All works well
EXCEPT I see the Query Paramater dialogue box show. Any way to not
show this?


The easiest way would be for you to have a form (e.g. MyDataEntryForm)
on the screen with the criteria in (e.g. MyTextBox) and reference that
in the query, e.g.

select * from MyQuery Where MyField = Forms!MyDataEntryForm!MyTextBox

Or if you're doing what I think you're doing, perhaps your query
should look something like:

select * from MyQuery Where City = GetCity()

And in the module that runs your report:

<--- (air code)
Option Explicit
Dim mstrCity As String
Public Function GetCity() As String
GetCity = mstrCity
End Function
Function RunReports
Dim rs as Recordset
(open up rs, etc)
Do until rs.Eof
mstrCity = rs!City
DoCmd.OpenReport ....
rs.MoveNext
Loop
(close up rs, etc)
End Function
--->

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2


Thanks,
But I basically have that now.

Here is a snip of my code...
Sub CSF()

dim
set
etc
Do Until rsP.EOF
P = rsP!PC
Do Until rsJ.EOF
J = rsJ!JC

R = rsP!REGION
FileName = R & " - " & P & " " & FN & ".xls" ' " for " &
R &
pass.J("Pick JC") = J
pass.P("Pick PC") = P
docmd.SetWarnings (WarningsOff)

================================================

Right here is where I pass the values and I see the query parm input box
shows.

================================================== =======
Send J
Send P

docmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
stDocName, FilePath & FileName, 0, J
loop
end
etc

docmd.SetWarnings (WarningsOn)
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRW | last post by:
I'm creating a simple reply form, and if a form item isn't answered I get an error: "Notice: Undefined index: rb_amntspent in c:\inetpub\wwwroot\mackinaw\survey.php on line 36" even if in the...
1
by: roderik | last post by:
How do I supress the output generated from each psycopg command: >>> import psycopg initpsycopg: initializing psycopg 1.99.10 typecast_init: initializing NUMBER .. .. microprotocols_add:...
1
by: David | last post by:
I have a custom control that contains a class that Inherits the panel control. I am trying to catch a keydown event in this class and then supress it from the rest of the control as well as the...
3
by: JG | last post by:
Hi all, I have a simple aspx page. On the page there is only one button. When I click on the button, the event sequence is Page_Load, Button1_click and Page_PreRender. How do I supress the...
2
by: Still Learning | last post by:
Hi, Currently a crystal report is getting 359.9999 from a dataset. Even with rounding set to 0.0001 it displays 360.0 which is wrong. How can I supress rounding or get it to display 359.9999? ...
4
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the...
1
by: Nikhil Mittal | last post by:
How to supress system errors in windows perl In unix it is 2>&1 , what is in windows :o
1
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the...
2
by: khani | last post by:
Hi i have following situation in cystal report in detail section i have a field say name.now i have five duplication record like this zahid zahid zahid zahid
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.