473,761 Members | 5,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2065
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!MyDataEnt ryForm!MyTextBo x

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.OpenRepor t ....
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.SetWarnin gs (WarningsOff)

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

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

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

docmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel9,
stDocName, FilePath & FileName, 0, J
loop
end
etc

docmd.SetWarnin gs (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
4530
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 code I allow for an unselected item. (Code at the bottom here.) It works fine otherwise. Now in the past I've made a change to php.ini to repress errors, but for this project I don't have access to the php.ini.
1
1550
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: cast 0x46dd20 for (bool, ?) initpsycopg: module initialization complete
1
3542
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 form that hosts the control. The problem I am running into is that the form that hosts the control will respond to the keydown event event. Any ideas what I am missing? Some source code to help:
3
3150
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 PreRender event? I know if I call Server.Transfer or Reponse.Redirect in the Button1 click event, the page prerender event will not occur. Thanks. Jie
2
1361
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? Many thanks! NJP
4
3728
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 </form> tag but Mozilla doesn't. Is there a way to supress the blank line? Thanks Rob www.rcp.ca
1
1760
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
2179
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 excel file has links to other excel files within it. When my program reaches this slide, it opens the powerpoint slide, then opens the excel file, then it prompts the user to select whether or not they want to update the links within excel. ...
2
1338
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
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.