PC Review


Reply
Thread Tools Rate Thread

Carrying a Date throughout the application

 
 
=?Utf-8?B?U2hhcm9uSW5HZW9yZ2lh?=
Guest
Posts: n/a
 
      24th Mar 2006
The data imported into Access includes a spreadsheet with monthly figures.
Once the month is select, a crosstab table is created using the month's
financial numbers.

I also need the date in two other locations.
1. For the final Report Heading in the format as "January 31, 2006" and
2. As a field in the History table that appends each month's records.

At one point in the code, I prompt the user for the month as "Jan", or
"Feb", or "Mar" .... then I create the Crosstab table. I also prompt the
user for the report heading date (format: "January 31, 2006" and finally, I
prompt the user for the History table date (any date format would work as
long as it's consistent for each month). HELP ! How can I prompt the user
only one time and carry that date throughout the application. (Using the
function Date () - days or months does not work since the report for January,
February or March can be pulled anytime in the year)
 
Reply With Quote
 
 
 
 
Duncan Bachen
Guest
Posts: n/a
 
      24th Mar 2006
SharonInGeorgia wrote:
<snip>
> How can I prompt the user
> only one time and carry that date throughout the application. (Using the
> function Date () - days or months does not work since the report for January,
> February or March can be pulled anytime in the year)


Two simple ways you can handle this:
1) Create a "system" table to store the date entered. Alot of folks use
this kinda table to store things like the company name, address, etc.
It's just a table with a single row, and each field storing the
appropriate value. So after they enter the date format that you want,
you store it on the table, and then retrieve it from the table with a
DLookup on the reports.

2) Create two public procedures in a module. One which accepts the input
of the date as a parameter and stores it in a global variable, and the
second which returns that same value. Then call the retrieve function
when you want to see the date on your report.

I've given you the gist of it, but actual code. Hopefully this will put
in you in the right direction. Holler if you need more.


--
-D
Duncan Bachen
Director of I.T., Ole Hansen and Sons, Inc.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.ExportXML exports dates in the wrong format or the 1899 date if date field is empty Jennifer Robertson Microsoft Access VBA Modules 4 2nd Apr 2009 02:57 AM
Carrying Date field info to next record. =?Utf-8?B?aWhvbGRlcg==?= Microsoft Access VBA Modules 3 1st Feb 2007 05:39 PM
ASP.NET web application - date conversions UK date format? =?Utf-8?B?UmljaGllcA==?= Microsoft VB .NET 7 26th Jun 2006 04:25 PM
Carrying a sum FEC Microsoft Access Reports 1 9th Nov 2003 04:59 AM
body and date field carrying over from a message to a task Belinda Microsoft Outlook Form Programming 1 5th Aug 2003 04:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.