Selasa, 28 Januari 2014

Re: [MS_AccessPros] Macros stopped working after DB split

 

Sounds like you need to either write a function or upsize your back end to SQL Server and use "real" triggers instead of Access wanna-be's. Here is a very simple function that assumes the form calling the function has a UserModified and a DateModified field (which I put in every table)


Public Sub RecUpdate(frm As Object)

'Purpose  : Set record change Modified Date

'           and user for audit trail

'DateTime : 6/22/2007 14:30

'Author   : Bill Mosca


    frm.UserModified = Environ("USERNAME")

    frm.DateModified = Now()


End Sub



Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@yahoo.com> wrote:

I was using them because I was using the Goods template to start with which had some built in, which I had used as a starting point for my application.

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070
"Only those who will risk going too far can possibly find out how far one can go."






On Tuesday, January 28, 2014 9:26 AM, John Viescas <JohnV@msn.com> wrote:
 
I guess that begs the question: Why did you use a Data Macro?

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jan 28, 2014, at 4:07 PM, Art Lorenzini <dbalorenzini@yahoo.com> wrote:

Thanks for the response John. I started to figure that out. But it does kinda of blow because now if I have a new employee I have to add them to several different copies of the employee table because this is a multi-user application. 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070
"Only those who will risk going too far can possibly find out how far one can go."






On Tuesday, January 28, 2014 2:05 AM, John Viescas <JohnV@msn.com> wrote:
 
Art-

Data macros run locally with the table they're in.  If you left the table on the server, it wouldn't "see" the user info on the local machine.  You are correct to move the table to the front end to be able to get the correct user ID.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jan 28, 2014, at 12:19 AM, Art Lorenzini <dbalorenzini@yahoo.com> wrote:

I moved the two tables that have data macro that are of concern in this situation to the front end and they are working again. So the FE must lose connection to them when they get split. 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070
"Only those who will risk going too far can possibly find out how far one can go."






On Monday, January 27, 2014 3:21 PM, "Embrey, Darrell" <DEmbrey@bcbsm.com> wrote:
 
It is difficult to tell without the code you are using to get and store the username.
 
Darrell
 
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of dbalorenzini@yahoo.com
Sent: Monday, January 27, 2014 4:19 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Macros stopped working after DB split
 
 
I have a database that depends on macros to retrieve the login name that are used to updates records that have been modified. It was working fine up to when I spit the database and now it does not see the current login user name nor will it store the user name in my tempvar. Where did I go wrong?

The information contained in this communication is highly confidential and is intended solely for the use of the individual(s) to whom this communication is directed. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information is prohibited. Please notify the sender, by electronic mail or telephone, of any unintended receipt and delete the original message without making any copies.
Blue Cross Blue Shield of Michigan and Blue Care Network of Michigan are nonprofit corporations and independent licensees of the Blue Cross and Blue Shield Association.








__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar