A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to modify query parameters in code?



 
 
Thread Tools Display Modes
  #1  
Old September 7th, 2006, 09:48 AM posted to microsoft.public.access.gettingstarted
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default How to modify query parameters in code?

Somehow your "parameter in an event" doesn't compute. That would
imply a hard coded value. You would do better to hard code the value
in the criteria line where you and others would expect to find it.

Your report is based on a query. The usual trick is to leave a value
in a control on the form that opens the report. On the criteria line
you refer back to it putting something like the following in the
criteria line:

Forms!MyForm!Mycontrol

If you're getting an unwelcome prompt you may already have a prompt in
square brackets in your criteria line or you may have gone through the
"parameter query" helper which could also evoke a prompt.

HTH
--
-Larry-
--

"Everyman" wrote in message
...
Could someone explain how I can assign a value to a parameter in an
event? What I'm trying to do is get around a prompt for input. I'm
hoping that if I assign a value in the report open event, then the
prompt won't pop up. I've already removed the param declaration

from
the associated query, and hardcoded a value, but the prompt is still
coming up, so there must be some reference to it that I'm missing.

Thank You



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.