Rabu, 01 Agustus 2012

Re: [MS_AccessPros] docmd.Rename question

 

Jim

Ok, so you have to rename the tables. This is how to use the year:
Year(Date())
-or-
DatePart("yyyy",date())

Concatenate it to the existing name.

Year is actually a function that requires a date & returns the numeric year of a date.

I get it, Jim. I work in one of the most advanced hospitals in Silicon Valley. Until we underwent some financial hardship because of the economy, our Operations printed out greenbar reports 4 or 5 inches thick EVERY DAY and distributed them by hand. Our new CEO has demanded we go paperless to save costs so finally these stupid reports are put in a depository on the network and people can view them. But some (read: accountants!) still insist on printing them out.

And I also understand that you get data from other sources. I have a financial reporting system that gets data from PeopleSoft, our registration system and a mainframe via delimited files. These are imported into a SQL database and massaged to get the reports. Millions have been spent on other software to do teh exact same thing, but they haven't found anything that works as goos as my application.

Ok, so you have to rename the tables. This is how to use the year:
DatePart("yyyy",date())

Year is actually a function that returns the numeric year of a date.

This in the Immediate window: ?Year(Date())
Returns: 2012

Bill

--- In MS_Access_Professionals@yahoogroups.com, Jim Wagner <luvmymelody@...> wrote:
>
> Bill
>
> The user has this process that downloads data and is updated yearly and she wants to archive the table. The crazier thing that the user does is that she renames the table and then makes a copy of the database and gives it the name of the database and the prior year. My Boss gets so frustrated with the user because she does not understand. We get a good laugh when they rename the table and then make a copy of the database for the next year. 
>
> We work in an environment where the customer or Departments get what they want, PERIOD. We are dealing with people that do not understand. Right now another department after spending months of development to get most of their databases to have a very cool email process, are considering going back to the manual process with excel and filtering the data for each department and copying to a different tab and then printing and walking the results to the supervisors. We have saved them so much paper and hours that it is not funny and now they want to throw it all away. All because they are accountants and do not understand Access. They are Excel users. 
>
> I do not mind the chastisement at all. Just understand that 99% of our data comes from outside sources like PeopleSoft, Advantage Financials, WebTMA, AS400 and others. Linked tables do not allow manipulation, unless we use make table queries to create a lot of tables for the data, which we have done but creates bloat in the databases. Sometimes it can take 25 queries to get a few tables to use for sources. 
>
> I appreciate all that my Yahoo user groups have done for me over the years. Thank You Bill for the honesty. 
>  
> Jim Wagner
> ________________________________
>
>
>
> ________________________________
> From: Bill Mosca <wrmosca@...>
> To: MS_Access_Professionals@yahoogroups.com
> Sent: Tuesday, July 31, 2012 6:04 PM
> Subject: RE: [MS_AccessPros] docmd.Rename question
>
>
>  
> Jim, Jim, Jim! Why are you renaming objects? Why not put a field in the table
> and add a new record for each year?
>
> Think RELATIONAL!
>
> Don't mean to chastise, but tables should not be renamed based on some outside
> information. A good design takes things like that into consideration.
>
> Regards,
> Bill Mosca,
> Founder, MS_Access_Professionals
> That'll do IT <http://thatlldoit.com/> http://thatlldoit.com
> MS Access MVP
>
> <https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E>
> https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
>
> My Nothing-to-do-with Access blog
>
> <http://wrmosca.wordpress.com> http://wrmosca.wordpress.com
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of luvmymelody
> Sent: Tuesday, July 31, 2012 3:46 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] docmd.Rename question
>
> Hello all
>
> I have an object that I need to rename in a process with the current year. I was
> going to use the copy object but I thought why not just rename it. I do not want
> to copy just rename. I have the current line for the copy object below but I use
> the Date to add the current date. I tried to change the word Date to Year but it
> does not work.
>
> DoCmd.CopyObject , "Building Inspection Data Before Inflation on" & " " & Date,
> acTable, "Building Inspection Data"
>
> Below is what I have to rename the object it does not work
>
> DoCmd.Rename "Building Inspection Data Before Inflation" & " " & Year, acTable,
> "Building Inspection Data Before Inflation on 7/30/2012"
>
> any help would be appreciative
>
> Thank You
>
> Jim Wagner
>
> [Non-text portions of this message have been removed]
>
>
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar