![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm thinking about using data macros (BACKEND table level) to track changes to a table. This may be trivial, but I can't figure out how to track which user in the FRONTEND made the change to the table so that I can track what was changed and who changed it. The user would make the changes via a form. |
#3
| |||
| |||
|
|
On Mar 25, 8:23*pm, elgin <sfielg... (AT) hotmail (DOT) com> wrote: I'm thinking about using data macros (BACKEND table level) to track changes to a table. This may be trivial, but I can't figure out how to track which user in the FRONTEND made the change to the table so that I can track what was changed and who changed it. The user would make the changes via a form. You could use a hidden form and place UserID in it and create a Log_Table (UserID,Table,RecordID,ChangeDescription) and insert record in it for the actions you would like to track. |
#4
| |||
| |||
|
|
This way, it will track any changes to the table(s) however they are made; form, macro, or VBA. Also, once the Data Macro is in place, it is independent of the front end forms, code, and versions. It's like an SQL trigger. Set it and forget it. What I believe I need is a way to track which computer/user's instance of the frontend initiated the change. |
ummy (text)
#5
| |||
| |||
|
|
Now, build a query like: SELECT tblDummy.ID, (fosUserName()) AS FUser FROM tblDummy; Save above in back end as qryUser |
#6
| |||
| |||
|
|
"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote in news:Cjijp.3015$aV3.284 (AT) newsfe02 (DOT) iad: Now, build a query like: SELECT tblDummy.ID, (fosUserName()) AS FUser FROM tblDummy; Save above in back end as qryUser You don't need a dummy table at all. This should suffice: SELECT (fosUserName()) AS FUser You don't actually need a FROM clause in the SQL statement. |
#7
| |||
| |||
|
|
David-W-Fenton wrote: "Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote in news:Cjijp.3015$aV3.284 (AT) newsfe02 (DOT) iad: Now, build a query like: SELECT tblDummy.ID, (fosUserName()) AS FUser FROM tblDummy; Save above in back end as qryUser You don't need a dummy table at all. This should suffice: SELECT (fosUserName()) AS FUser You don't actually need a FROM clause in the SQL statement. Oh really? That's no longer a requirement? Very interesting! It's about time! Darn, that's been the case since A2003 and I never even noticed! Thanks! |
#8
| |||
| |||
|
|
You don't need a dummy table at all. This should suffice: SELECT (fosUserName()) AS FUser You don't actually need a FROM clause in the SQL statement. Oh really? That's no longer a requirement? Very interesting! It's about time! |
#9
| |||
| |||
|
|
David-W-Fenton wrote: "Albert D. Kallal" wrote Now, build a query like: SELECT tblDummy.ID, (fosUserName()) AS FUser FROM tblDummy; Save above in back end as qryUser You don't need a dummy table at all. This should suffice: SELECT (fosUserName()) AS FUser You don't actually need a FROM clause in the SQL statement. Oh really? That's no longer a requirement? Very interesting! It's about time! |
#10
| |||
| |||
|
|
Bob Barrows wrote: David-W-Fenton wrote: "Albert D. Kallal" wrote Now, build a query like: SELECT tblDummy.ID, (fosUserName()) AS FUser FROM tblDummy; Save above in back end as qryUser You don't need a dummy table at all. This should suffice: SELECT (fosUserName()) AS FUser You don't actually need a FROM clause in the SQL statement. Oh really? That's no longer a requirement? Very interesting! It's about time! I'm not going to dump my OneRow table anytime soon. One common usage is to add an ALL row to a combo box: SELECT ID, Descr FROM lookuptable UNION ALL SELECT 0, " ALL" FROM OneRow Leaving out the FROM OneRow provokes an error about at least one table is needed. |
![]() |
| Thread Tools | |
| Display Modes | |
| |