Re: =Min(DateField), =Max(DateField)

message from =?Utf-8?B?Sk1vcnJlbGw=?= on 5 May 2004
Hello again and thanks for all your assistance in this. Below is what I use to load the sql statement.
 
John Vinson replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 10 May 2004
Glad you got the problem resolved (and thanks to everyone who pitched
in!) but... you're going ALL the way around Robin's barn here. You
don't need the bd, bm, by, bdate, edate variables AT ALL. Just format
the [Begindate] and [Enddate] values directly from the form.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Wayne Morgan replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 5 May 2004
=[Forms]![form_reportdates]![bdate], but after saving, it shifts to
=Forms!form_reportdates!bdate (which gives a #Name? value when run).<

It appears from you code that BDate is a variable and the name of the
control is BeginDate. If that is the case, then BDate in the above should be
BeginDate. This should work if the form is still open (visible or hidden)
when the report opens.

Is there a reason you're breaking the date apart and putting it together
again?
 
=?Utf-8?B?Sk1vcnJlbGw=?= replied to Wayne Morgan on 5 May 2004
control is BeginDate. If that is the case, then BDate in the above should be
BeginDate. This should work if the form is still open (visible or hidden)
when the report opens.

In my report, I have experimented with a control named "begindate" with control source =Forms!form_reportdates.begindate; and "bdate" with control source =Forms!form_reportdates.bdate, neither will show the date field to the report; even with the form still open.

It is leftover experimental code - now removed.

This is getting frustrating...
 
DebbieG replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 5 May 2004
Hopefully you have double-checked that you are using the correct name of the
form and the exact name of the form's textbox containing the dates you want
to capture. .

Another thing to check is the NAME of the textbox on your report. It should
not be the name of a field. At least that has been a gotcha for me in the
past.

HTH,
Debbie

"JMorrell" <anonymous@discussions.microsoft.com> wrote in message
news:D8E45FFE-362E-4CB8-A229-E730F896E169@microsoft.com...
control is BeginDate. If that is the case, then BDate in the above
should be
BeginDate. This should work if the form is still open (visible or
hidden)
when the report opens.

In my report, I have experimented with a control named "begindate" with
control source =Forms!form_reportdates.begindate; and "bdate" with control
source =Forms!form_reportdates.bdate, neither will show the date field to
the report; even with the form still open.

It is leftover experimental code - now removed.

This is getting frustrating...
 
=?Utf-8?B?Sk1vcnJlbGw=?= replied to DebbieG on 6 May 2004
Hey, how about that. Changing the NAME of the text box is what did the trick. Thank you, Thank you, Thank you, Thank you for that tip.
 
Wayne Morgan replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 6 May 2004
If that fixed it, then it sounds as if you had more than one item with the
same name. By default, textboxes tend to have the same name as the field
they are bound to. As you have seen, this can cause problems. I change the
name of all of my controls by putting a prefix on them, such as txt for
textbox. So a textbox bound to a field named MyField would be called
txtMyField.

For a list of common prefixes, check here.
http://www.mvps.org/access/general/gen0012.htm
 
=?Utf-8?B?Sk1vcnJlbGw=?= replied to Wayne Morgan on 6 May 2004
Naming conventions are my friends. Naming conventions are my friends. Naming conventions are my friends.

Here's a new twist to my on-going project. Now that I have the begin and end dates showing on my report (when viewed on screen, that is), they seem to disappear when the report is finally printed to paper. All looks fine on the screen, but on paper, the field shows the dreaded #Name? Somewhere between my pc and the printer, the values are lost (I think). Is that right? And if so, what to do now?

tiaaa,
JMorrell
 
Wayne Morgan replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 6 May 2004
Is the form being closed before you actually do the print?
 
=?Utf-8?B?Sk1vcnJlbGw=?= replied to Wayne Morgan on 6 May 2004
I close the form right after the DoCmd.OpenForm statement. I know where you're going with this now. Thanks tons for opening my eyes on this. I can take it from here.
 
=?Utf-8?B?Sk1vcnJlbGw=?= replied to =?Utf-8?B?Sk1vcnJlbGw=?= on 5 May 2004
Oops.... I should mention that betsql is dim'd earler and that SelectCategory is for something else.

And I didn't change the format of the control, but the data source.

sorry... it's real early for me.
 

Archived message: Re: =Min(DateField), =Max(DateField) (MS Access Database)