[AccessD] OpenArgs help [WAS] Citing entered data range on report

William Benson (VBACreations.Com) vbacreations at gmail.com
Fri Jun 7 18:09:51 CDT 2013


Love the downloads site John. I don't know how the shareholders got their
spots, but good on them!!

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W Colby
Sent: Friday, June 07, 2013 2:45 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OpenArgs help [WAS] Citing entered data range on
report

I think I have an openargs class on our web site.

http://www.databaseadvisors.com/downloads.asp

The second item down.  There should be a demo to show how it is used and
everything.

This class when instantiated in any form will automatically read and parse a
string of openargs in the format:

AgrName1=ArgValue1;ArgName2=ArgValue2;

Then the class allows you to just read them out as you need them.

John W. Colby

Reality is what refuses to go away
when you do not believe in it

On 6/7/2013 12:22 PM, John Clark wrote:
> Well, I went your way. I knew you were correct, and I was just being lazy.
However, I have never used OpenArgs, and I'm struggling a bit.
>   
> Here is what I have so far...
>   
> The calling form, has fields txtBegDate and txtEndDate, and then a button
w/the code:
>   
> stDocName = "qryWitnessLog_DatePicker"
> DoCmd.OpenReport stDocName, acPreview, , , , txtBegDate.Value & "|" & 
> txtEndDate.Value
>
> Then in the OnOpen event of the rereport, I have...
>   
> Dim aryOA As Variant
> aryOA = Split(Me.OpenArgs, "|")
>   
> Me.txtBegDat.Value = aryOA(0)
> Me.txtEndDate.Value = aryOA(1)
>   
> This latter code is something I found on the Internet.
>   
> This doesn't work though...I am getting a compile error..."Method or Data
Member Not Found"
>   
> I've got everything working except for putting the date range (start date
& end date) on the report. If there is another way to do this, I'd be open
to it. But, I don't know how to do this w/out the calling form being in the
way of the report preview. I guess I could just print it out, but that isn't
right either...
>   
>   
>
>>>> Charlotte Foust <charlotte.foust at gmail.com> 5/29/2013 2:22 PM >>>
> You could return the parameters in the query by creating an expression 
> field for each. That would allow you to see it in the report, but I 
> prefer to capture start and end dates in the form that selects the 
> report and pass it into the report in OpenArgs.
>
> Charlotte
>
> On Wed, May 29, 2013 at 11:16 AM, John Clark
> <John.Clark at niagaracounty.com>wrote:
>
>> I am creating this report for our DA's office, that let's them enter 
>> a start date and an ending date, and it shows all witness fees & 
>> mileage paid out for that range, with a total at the end. What I do 
>> not have though...and maybe I'm just having a brain-dead moment 
>> here...is the range that it covers. I'd like it to list the range
somewhere on the report.
>>
>> Now, I did this the quick and easy way and had it based on a query, 
>> and it is in that query that I placed the spot for date entries, by 
>> putting the code, ">=[StartDate] And <=[EndDate]" in the date field. 
>> Is there a way to use this entered info, or do I need to create an 
>> input form and have the dates entered there?
>>
> Notice: This electronic transmission is intended for the sole use of the
individual or entity to which it is addressed and may contain confidential,
privileged or otherwise legally protected information. If you are not the
intended recipient, or if you believe you are not the intended recipient,
you are hereby notified that any use, disclosure, copying, distribution, or
the taking of any action in reliance on the contents of this information, is
strictly prohibited. Niagara County is not responsible for the content of
any external hyperlink referenced in this email or any email.
> IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR
ELECTRONIC COPIES.
> Thank you for your cooperation.
>
>

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list