Logging Changes Made In A Form
Jun 10, 2005
I was wondering if there is a simple way to check if any changes have been made to a record when the form is closed because I would like to create a log of records that were changed. I'm sure I could create some variables to store the fields when the form is opened then check if they're still the same when the form closes, but I figured there's probably already a built-in way of doing this (since the undo button must obviously use it)
Thanks,
Adam
View Replies
ADVERTISEMENT
Feb 27, 2015
I am trying to add the name of the employee show up in on the opening form after logging into the database. I am able to get the user right (Admin only), but not the name. In the Default Value in Properties, I have it set to =CurrentUser() and I have the Employee field in the Control Source to record current user.
How can I make this so it indicate the user logged in?
View 2 Replies
View Related
Mar 17, 2015
i am currently developing a database what i need to do is to restrict user to view selected record and change them. i have build a login form in which i have two areas as a user name in combobox and a password text box. i have another form in which i have a combo box named area what i need to do is to limit the area combo based on the selection of the user login form previously. for example if a user select LAS VEGAS in user combo and enters its password after clicking the button login the another form appears in which thier respective stores and sales are saved, their is a combo box named area in which i want to limit it by LAS VEGAS i mean it would only show LAS VEGAS in drop down based on the previous selection in login form.
View 4 Replies
View Related
Jul 12, 2005
I need a special messagebox witch returns integer value to public variable.
now I have made it the problem is how to use it.
In Sub where the messagebox form is opened the Sub should wait until it get the response from messagebox_form. That is because this sub will save it in the table.
So how to get te sub to stop and wait until the public variable is changed
(if I use some kind of loop I can't use the form at the same time)
-thans, Jalmari
View 1 Replies
View Related
Jul 23, 2012
It has really been awhile I posted in this forum
I have a form purchase order details, that I used to enter quantity of items purchased. I found out that I can't delete quantities entered on the form. It appears to delete, but on checking the quantity in the inventory, it was not deleted. The vba code in my quantity section of the page is this
Quantity_AfterUpdate()
Dim IT As InventoryTransaction
If Me![Quantity] = 0 Then
RemoveCurrentLineItem
End If
AddPurchase Me![Purchase Order ID], Me![Item ID], Me![Quantity], NewInventoryID
End Sub
View 1 Replies
View Related
Feb 26, 2014
I created a form for data entry only where records could be continually added until you were done and closed the form. Into that form I dropped a query that kept a running list in datasheet form of all the new records entered while the form was open, and then cleared when the form was closed (so the query was empty when the form was opened again).
My Problem: I accidentally deleted that query.
What I need:
-Query to be empty when form is opened.
-Records added while form is open get displayed in the query after record is saved.
View 1 Replies
View Related
Dec 13, 2014
How to generate either a form or report able to show me the history of data changes made by users in the fields of Access Objects. I'm more interested in Forms, since the users will use Forms to change data in the db.
Let me give an example:
My db has, for instance, a form named Frm1 and a form named Frm2. Both were built including several fields such as text boxes, combo boxes, etc.
So, if the user Paul first changes the field Color of the record Id 235 in the Frm1 from Green to Yellow, and then, down the road George changes the field Size of the record Id 14 in the Frm2 from Big to Small, I need to know what changes were made, by who, and when changes happened. Also, it is important to know if a record Id is added or excluded.
My final intent is to have a report/form that shows some sort of user activity log which I think could be like this:
Date--------Time----------User-----Form------RecId------Action------Field-----From-----------To
Dec12,14---15:12:35-----Paul-----Frm1--------235------Changed---Color----Green-----------Yellow
Dec18,14---07:05:19-----George--Frm2---------14------Changed---Size-----Big--------------Small
Dec22,14---09:23:59-----Sean----Frm2--------116------Deleted
Dec23,14---11:07:03-----Paul-----Frm2--------321------Added
etc...
By sorting this output by date, form and field it will easy to check/audit for user processing mistakes.
I know enough to build tables, queries, forms and reports, but don't know how to structure such thing. What kind of form event should I setup?
View 2 Replies
View Related
Sep 24, 2014
I'm trying to resolve a problem with a form displayed as follows
MainForm
-->SubForm1 embedded in main form
--->SubForm2 embedded in SubForm1
When I edit subform2, then return to the mainform and edit a field on the mainform, I get an error.
'The data has been changed. Another user edited this record.... Re-edit the record.'
My understanding to resolve this is to do a requery. So I added:
Me.Parent.Requery
Me.Parent.Parent.Requery
as part of the LostFocus event for subform2. However, I now get a Write Conflict error when returning to a field in the main form. I get a dialog box with the option to Copy to Clipboard or Drop Changes. I can select Drop Changes and it will let me edit the main form afterwards.
This is Access 2010 over SQL. how to get the main form to accept the changes made to the underlying subform?
View 8 Replies
View Related
Apr 27, 2015
So I'm trying to populate a table based on selections I make within a form.
The form is based of a query that pulls a new product category that needs to be added to my first reference table for products.
The form shows all the new unique product codes, and there is a drop down box with product categories whose source is also the first reference table, so a new code would be:
'JBL - TRX - FVB - TRZ' And based on that new info, I would select from the drop down to select the corresponding category and click 'Add Record' button.
I'm building the event for the button and the code is as follows so far :
Private Sub Add_Record_Click()
End Sub
Private Sub cmbAdd_Record_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblPVMTable(PVMJoinField, SummaryPVMCategory) " & _
[Code] ....
I keep getting errors with the main portion of code.
Name of table fields :
PVMJoinField
SummaryPVMCategory
Name of Query Fields Populating the Form:
PVM_JOIN_FIELD
cboSummaryPVMCategory
View 4 Replies
View Related
Feb 15, 2006
Hi
I have a command button which dials a phone number via the PC. When i cick this button the date and time are written to a table.
Private Sub Call_Me_Click()
Lsd.Value = Date
Ltc.Value = Time
Logged.Value = GetUserName
On Error GoTo Err_Call_Me_Click
Does anyone know how i can get the user name written to the table as well?
View 1 Replies
View Related
Apr 3, 2006
Is there a way in Access to logout users from a database in order to make updates without having to setup a FE/BE situation? My company is using Novell Client 4.90.0.0 SP1a. I have read some logs where you choose File --> Open (exclusive), but I do not have that option (using Access 2000). Any other thoughts?
View 6 Replies
View Related
Jun 21, 2005
I have a form from which people view records out of a db.
I would like to log the date/time and the key record they view into a table
The usage table has a date/time field & a string field for the viewed record.
I can run an append query to update the Usage table but can't figure out how to get the date/time into the table ?
Is it easier to write the whole lot out to a file ?
View 1 Replies
View Related
Jan 17, 2005
Hi,
Does anyone know if it's possible to use the records stored in an Access 2002 database to log users into an ASP.net page? I'm trying to code it in vb.net but im not sure how it could be done. Basically I think I need 2 text boxes on the ASP page where the user can enter their name and password. I then somehow need to retrieve the name and password from fields in the database (using ADO.net i think) and compare them with those entered by the user. If they match then I want to load another page, and if not then I want to display a message saying login details are incorrect.
Any help on this subject would be much appreciated- the fields i have at the moment are called 'User' and 'Password' in a table called PERSON.
View 4 Replies
View Related
Feb 7, 2005
I have a database set up that utilizes the user level security offered by Access. So basically everyone logs into the database, entering their user name and password.
Is there a way that I can log the currentuser() to a table when they sign in? And is it possible to assign a time stamp as well?
Any help or direction is much appreciated.
View 2 Replies
View Related
Jun 1, 2007
I am trying to output the following code to a log file. What I am trying to do is when a user opens the database and the switchboard opens up it logs the user to a log file. The code works fine when run from the modules section providing I leave the DoCmd.Output command out. Any thoughts on what I am doing wrong here. This is my code.
Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
Set cn = CurrentProject.Connection
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4.0 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name, "date & Time"
DoCmd.OutputTo ([rs.Fields(0).Name], [""], [rs.Fields(1).Name],[ _
""], [rs.Fields(2).Name], [rs.Fields(3).Name], ["date & Time"]), cn.OpenSchema, acFormatTXT, "c:databaselog.txt", True
While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), rs.Fields(2), rs.Fields(3), Now; rs.MoveNext,
Wend
View 3 Replies
View Related
Oct 25, 2012
I am trying to implement a username and password system on my DB. What I have done so far is created a table with username, password, permission level and datestamp. So when the db is opened, the form pops up and someone has to sign in. When they hit the 'login' button, there is a field that will populate the time in which they signed in. This will also allow me to see who is logged in. When they are finished, they will end up on the login screen where there is a close button. When they hit the close button, the field with the datestamp will be cleared. This will allow me to know that the user is no longer on the db. Here comes the question, if a user just closes access without hitting my 'close' button, my datestamp field will not be cleared. I have tried using the "onclose" event, but of course i used 'me.datestamp = "" but the form is already closed, so it says 'can not change the value of this field.' How can i clear the value of the datestamp field for a specific user when a user closes the program the "improper" way.
View 3 Replies
View Related
Dec 11, 2013
Just a question, I am developing a database for the company I work for and being new to Access, I have successfully made a login menu when the database starts up. The employee selects there name and begins data entry. Is there any way to log the activity of each employee, which records they inputted, date and time and so on?
View 3 Replies
View Related
Dec 17, 2014
I have an access 2010 web database, modified from a microsoft template (Desktop inventory database) that several users will need to log in to. The database contains a table of products.
The challenge is, every user needs to only see a subset of these products and never see the whole list.
At the moment i have some code to modify an existing query based on the logged in user's details. As they log in, some tempvars are created and these are used to modify the query criteria.
This works well when the first user logs in, but the moment the next user logs in, the query is modified again and the product list refreshes and now his products are shown and not the first users! Im thinking i need to dynamically create a permanent query for each user on log in?
Here is my code so far:
Button on login form has the following code that collects the user's details
Code:
Private Sub cmdLoginMine_Click()
Dim ID as long, strEmpName as string,strZondsc as string,strgrpdsc as string
ID = DLookup("ID", "Employees", "Login='" & Me.txtUser.Value & "'")
strEmpName = DLookup("FullName", "Employees", "Login='" & Me.txtUser.Value & "'")
strgrpdsc = DLookup("MyGrpdscs", "Employees", "Login='" & Me.txtUser.Value & "'")
strzondsc = DLookup("MyZondscs", "Employees", "Login='" & Me.txtUser.Value & "'")
TempVars.Add "tmpEmployeeID", ID
TempVars.Add "tmpEmployeeName", txtUser.Value
I then call a function that modifies the existing query, populating it with this users details for the criteria
Code:
qryEdit strgrpdsc, strzondsc, ID
Sub qryEdit(strgrpdsc As String, strzondsc As String, ID As Long)
Dim qdf As DAO.QueryDef
Dim qdfOLD As String
Set qdf = CurrentDb.QueryDefs("InventoryQryforDS")
[Code] ....
The results of the query are shown on a form, which is what is currently requerying and showing the wrong data. The data is shown on a form, linked to one of the new style navigation buttons as shown.There cord source property of the form is the query that's populated as described above.
View 1 Replies
View Related
Feb 7, 2008
I recently changed the code to a case statement which recoded a value into a new field
i.e.
Case = 1
Me.Field2 = 2
and so on...
However the old data would not reflect this change as the Me.Field2 value had already been created.
Short of opening each form, changing a number closing it and then changing it back to original value, it there any way to get the database to rerun all the code in the background essentially?
View 2 Replies
View Related
May 19, 2005
I have created a button to save changes and to undo changes on a form. However if the user has not made any changes, i get a message saying that the Undo command is not available and the same with save changes.
Therefore if no changes had been made i would like to just ignore that part of the action and continue with the rest of the event procedure.
My code for undo is..
Public Sub UndoChanges_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me.frmtabContact_Details.Enabled = False
Me.frmtabCustomer_AC.Enabled = False
Me.frmtabCustomer_Options.Enabled = False
Me.Edit_Contact.Visible = True
Me.Edit_Contact.SetFocus
Me.frmSave_Changes.Visible = False
End Sub
View 1 Replies
View Related
Feb 8, 2005
i named one of my fields in a table with spaces "quantity on hand"
Now i cant refrence is in vba.
If rsSa!D < rsInv.Fields!"quantity on hand" Then
this does not work. I cant go back and change the field name on the table.
thanks
View 2 Replies
View Related
Aug 8, 2005
Does anybody know of a site where you can download/modify/use pre-made databases files?
I am looking to create a basic database to store survey details about signage on site for 200 sites.
Details i need to include are Site, Sign, and Components....
I think the database itself would be fairly standard, even if the fields needed tweaking
I don't want to invest the time into this if there is something I could use already out there
View 1 Replies
View Related
Mar 15, 2006
Hi guys,
Im fairly new to MS Access and have recently created a simple database to track the details of people in my department.
The database is on a shared drive and the idea was that when the details of the individual change, they open the database themselves and edit the appropiate field.
However, is it possible to track the changes that people make over a certain period (ie every month).
Thanking you in advance,
Jonny
View 1 Replies
View Related
Feb 29, 2008
I've made my mde file from a mdb which is fine apart from the fact that I can still view all the tables and queries and more to the point able to change them. Has anyone come across this before, if so how can it be fixed?
View 3 Replies
View Related
Mar 25, 2008
I need to know if there is anyway to view any changes made to the security workgroup file I have with my database. I need to know when or if someone is changing it to allow someone else full access to the database, any help would be greatly appreciated.
View 3 Replies
View Related
Feb 9, 2007
I was editing one of my tables in datasheet view and when I closed the table, Access asked me if I wanted to save changes. But I didn't make any changes to the design of the table or the filters I had set up. I just edited the data within datasheet view. The reason this is bothering me is that I am afraid I accidentally changed something. The only explanation I have for why it asked me if I wanted to save changes, is that I used the "undo" command to cancel a typo that I made while editing in datasheet view. When I hit "undo", it fixed the typo, and scaled back up to the first record of the datasheet. At first I thought using the "undo" command might have been the culprit, but when I re-opened the table and used the "undo" command again, it undid the change, but it didn't scale back up to the first record of the datasheet, like it did the first time I used the command. Anyway, I am staying away from the undo command from now on. It's about worthless in Access anyway, because it only undoes your last action. Have any other Access users been asked to save changes when they know they haven't made any changes to the design of the table?
View 2 Replies
View Related