Capturing User Name From Form Field Entry

Feb 6, 2007

In this db, the users select their name from a dropdown in an auto-open form, but with no password. I want to capture this value for use as the default value in a field on another form, but with the first form closed. I have seen the ENVIRON(Username) function referred to many times on here, but I need to capture the entered value, not the Windows or network login.

Is this possible without leaving the form open? I suppose I could just set its Visible to False when they enter their name, but I try not to have any more windows open than are necessary.

THANKS for your help!!

View Replies


ADVERTISEMENT

Update Query For Capturing Log Out Time Of User

May 18, 2006

I have done some searching to find a method for logging & timestamping when users log in and out. I have no problems with capturing the Log IN information my problem lies with the log out portion where I am trying to use a Update query to update when the user logs out of the database:

I can get the update query to do what I want, but for some reason it is creating a duplicate record (exactly the same as the last record updated)

Here is the code I am using:

UPDATE LogInTable SET LogInTable.LogOutTime = Time()
WHERE (((LogInTable.LogOutTime) Is Null) AND ((LogInTable.UserName)=LogUserName()));


Basically I am trying to tell the Query to ONLY update records where the "LogOutTime" is Null AND where the UserName field in the table = the username of the person trying to run the update query.

Please help I can't figure out how to prevent these duplicates. :(

View 9 Replies View Related

General :: Capturing And Saving User Name Who Created And Updated A Record

Jul 20, 2012

I have taken the Access Tasks template and modified a bit. It now captures and saves the time and date a record is modified. The database is on a network folder and is shared among our team users.What I would like to do next is make it,

1- capture and record on my Tasks table the user name of who created the record by using the fOSUserName() function. I have the table fields "Created by" and the VB code in a module. This would happen only once when the record is created.

I would also like to do this with the machine name for which I have the module too. fOSMachineName()

and,

2- capture and record the user name of who modified a record. For this I also have a field in my task table "Last Modified By" and i hope i can use the same fOSUerNmae() function.

I got to the point where I put an unbounded text box with the =fOSUserName() in it and it does show the user name but how do i get to record to my task table?how the template removes the tasks that are completed from the task list as soon as it is updated to completed? how can I make this happen with a cancelled option after I add it to the drop down list?

View 3 Replies View Related

Forms :: Prevent User Navigating From A Field If Entry Is Invalid

Mar 5, 2013

I need to ensure that the data entered into a field on a form is correct. The field contains an email address and I have a function to check if the format is correct.

If the format is incorrect I need the cursor to return to the field in that record. The form is continuous.

What event should I use?

View 2 Replies View Related

User Must Save On Form Or No Entry

Feb 3, 2005

Hello,

Can someone please tell me how to make it so that a user must save on a form or there is nothing entered into the table? As it stands anyone who views the form creates a new record.

Thanks in advance!

View 4 Replies View Related

Prevent User From Skipping Records In Continuous Form During Data Entry

Nov 21, 2006

I have a main form with several continuous subforms. Each subform consists of several listbox controls. I would like to require the user to select an item from the listbox before being allowed to move to the next record in the subform, and upon reaching the last record in that continuous subform, to require an entry there in order to move to the first record in the next cont. subform.

As an added bonus, it would be nice, though not necessary, to automatically jump the focus from one record to the next after data is entered. But my basic goal is to avoid skipping records.

Caveat: I cannot use the "required" option in the field to which the control is bound because that field has a default value previously entered using an append query. (The default value basically means "not yet entered" and is not one of the options in the listbox. I am using this because this field is a foreign key in the table, thus it must have a value in order to have a record with which to populate the subform.)

My apologies if this has been asked and answered elsewhere, but I've searched and, while I found a few related threads, they don't quite answer my question. Here they are for reference:

http://www.access-programmers.co.uk/forums/showthread.php?t=38364
http://www.access-programmers.co.uk/forums/showthread.php?t=69047
http://www.access-programmers.co.uk/forums/showthread.php?t=103176

Thanks for any help! Also, if you are going to recommend VB code, could you be specific about how and where I should use it? I'm not afraid of code, but I'm definitely new to it...

View 7 Replies View Related

Capturing Changes When Form Closes

Jul 7, 2006

I have a form that records when a user edits a record. This change is only recorded when the user clicks the "update record/save" command button. What I need help with is capturing the changes made when a user edits the record in any field and doesn't click the save button upon closing the form. If the user doesn't edit any fields in the record, a new instance of this edit will not be saved to my edited records table and the form just closes

View 2 Replies View Related

Form For Capturing Data

Aug 1, 2006

Hi All,
I'm a novice to Access and I need some help developing a form page where by users can input and record daily project activities.

I have most of the form complete, however, i find that when a user accesses the page the previous record is sometimes showing. How do I setup my form page so that all fields are blank everytime? And how do I set it up so that a user can't scroll through records in the form screen.?

View 2 Replies View Related

Modules & VBA :: Capturing Form Data In Email

Jan 30, 2014

So, I'm very new to Access and not all that skilled in VBA. I have, through trolling the internet found some code that does allow me to send an email on the click of a button on a form through Lotus Notes.

However, I cannot get any of the data on the form to show up in the email.

How do I even do something simple like, have the subject line come from a text box on the form or have the body come from a text box (or 2)?

Here is the code I have so far - also, the "attachment" part does not work - but one problem at a time...

----
Public Sub Command15_Click()
'-------------------------------------------------------------------------------
' Date: 02-06-2003
'
' Sends an email via Lotus Notes.
'-------------------------------------------------------------------------------
'Set up the objects required for Automation into lotus notes
Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim MailDoc As Object 'The mail document itself

[Code] ....

Again, I literally just have this as an event on "On Click" for the button. Nothing too fancy. It sends an email....with whatever text I manually put in to this code....which is not ideal....

View 9 Replies View Related

Forms :: Copy Value From Field In Subform To Field In Main Form During Data Entry

Jul 18, 2013

How can I get the value from a field in one table (in the sub form) to copy/insert into a field in another table (in the main form) when adding a new record?The main form and sub form are linked using parent/child linking, and the sub form is in a tab.I have table A (Visit Dates) in the main form which is used to record the date of a visit to a church. Table B (Quarters and Peals) is used to record an event that took place at that church during that visit. Note that not all visits in table A require a record to be created in table B - but half or more do.

In tables A and B I have a field called "QuarterOrPealID" and these are both primary keys, though the field in table B is set to 'no duplicates' and in table A it's set to 'duplicates allowed', as table A has its own auto number/pk. They are both linked in the relationships.

So, when I add a new record to table A using the main form, I might then need to click on the tab in the sub form to create a new record in table B, which has to be linked to the same record in table A. When the "QuarterOrPealID" auto number/pk is generated in the sub form (table B), I need that value to update to the "QuarterOrPealID" field of the main form (table A), so that when I'm viewing these records the form pulls all the information nicely together.

View 10 Replies View Related

Forms :: Saving Specific Data From Data Entry Form Depending On User Selection

Dec 18, 2014

I am trying to save specific data from a data entry form to a specific depending on what the user selects from a dropdown/combo box.

So if the user selects "test company from the combo box, that data (from that form) will save to the Test company data table.

View 5 Replies View Related

Validate Form Field Entry

Feb 18, 2005

i would like some help on how to validate a user's entry in a form. i have a query that calculates number of hours remaining for a particular customer. when a user submits the number of hours used on the form, i want to check that this value does not exceed the number of hours they have remaining. and display a message box if they dont have enough hours remaining. any suggestions on how best to do this?
the query has a where statement like 'WHERE customer = customer_code' so customer_code is entered by the user. how do i set this so that the value for customer_code is taken from a field on the form?

View 2 Replies View Related

Populate Form Field From Subform Entry

Oct 19, 2006

I have looked at multiple samples on this forum and others and cannot seem to get the result I want working.

Have main form TmLdr made from table of same name. Entries include ReqName and CostCenter. These same entries are on a subform. On the After Update event on the CoRecDt (main form), I want the name and CostCenter entered on the subform to populate on mainform. This subform will be filled out by the user once and as long as they are using their own machine there will be no need to re-enter their name.

I think that I am so close but just a touch away. I am attaching my DB with hopes someone can take a peak at it and let me know what I am missing. Thanks so much.

View 1 Replies View Related

Field Dependent On ComboBox For Data Entry Form

Mar 16, 2005

Hi,
I've got a data entry form where orders can be created. Within this form there is a ComboBox which is used to search for items and stores the selected item ID in the Order table. However the field for storing the Unit Price relating to the selected item is currently manually enterable. Where as I would like this to be dependent on the item selected within the ComboBox and updated automatically.

At the moment I've added an extra colum to the ComboBox to retrieve the relevant Unit Price and I can show this in a normal seperate text box using '=Combo27.Column(1)' as the ControlSource.

How can I get rid of the text box and incorporate the code into the current UnitPrice field so as it inserts the relevant record (price) into the UnitPrice coloumn of the Order table?

Any help on this would be much appreciated!

View 1 Replies View Related

Creating Recordset With Only One Entry Per User

Nov 25, 2005

hi

i am trying to write a query to produce a descending recordset of photo_id but only one from each user e.g

if these are the top records

photo_id 150 m_name dave
photo_id 149 m_name dave
photo_id 148 m_name dave
photo_id 147 m_name john
photo_id 146 m_name john
photo_id 145 m_name fred

i want the query to produce this

photo_id 150 m_name dave
photo_id 147 m_name john
photo_id 145 m_name fred

and so on, there are other fields also but that gives you the idea i hope.
what i have come up with is this

SELECT MAX(FORUM_ALBUM.Photo_id) AS ID, FORUM_ALBUM.Photo_Name,FORUM_ALBUM_USERS.M_Name,FO RUM_ALBUM.Member_id
FROM FORUM_ALBUM, FORUM_ALBUM_USERS
WHERE FORUM_ALBUM.Member_id=FORUM_ALBUM_USERS.MEMBER_ID AND FORUM_ALBUM.Photo_Status=1
GROUP BY FORUM_ALBUM.Photo_id,FORUM_ALBUM.Photo_Name, FORUM_ALBUM_USERS.M_Name, FORUM_ALBUM.Member_id
ORDER BY FORUM_ALBUM.Photo_id DESC;

this gives me the records i want in the correct order but it gives multiple instances of each M_Name instead of just one record for each M_Name

i hope i have explained this clearly enough

thanks

Dave

View 2 Replies View Related

User Friendly Data Entry

Jun 29, 2006

Please Exuse the question I am about to ask. I am a bit rusty with Access and cant remember how to do the following. I have tried and tried to work it out and tried various help searches but cant get the answer I'm looking for.

What I need to do is create a data entry form, very simple! However I want the user to be prompted to enter a project name and number in order to find the project that i want the new data to be entered under. Then it will need to create a new record in that project ready for new data to be entered from the data entry form.

I hope it is clear what I need to do

View 1 Replies View Related

Forms :: Conditional Formatting Of Currency Field In Entry Form

May 26, 2015

I have some Conditional Formatting of a Currency Field in an Entry Form. The cell is conditionally formatted with a yellow background when the value is zero.

I now wish to add an additional condition to the expression such that even if the value is zero it will not be formatted if a specific check box is TRUE.

I have tried modifying the expression such that it reads;

[currency field]=0 AND [check box]<>TRUE.

It correctly turns off the conditional formatting if the check box is ticked, but does not turn it on again when the check box is unticked.

View 14 Replies View Related

Queries :: Search Multivalue Lookup Field From Form Entry

Sep 20, 2013

I have a form that looks up office names and will automatically populate a field called office number based upon their selection in the combo box. I have a submit button on click event set up to run a query.

Now, here's where I am running into issues: In this query, I need to pull selected columns of information based upon a multivalue lookup field. This multivalue lookup field is joined with the table that the values populate from.

The form will only have one value stored in the txt box field, and I need to be able to search for all records containing that one value.

This is what I have for code:

SELECT FilePlan.FPName, FilePlan.Description, FilePlan.[File Code], FilePlan.GRS, FilePlan.Schedule
FROM Offices INNER JOIN FilePlan ON Offices.[Office Number] = FilePlan.OfficeNumb.Value
WHERE (((FilePlan.OfficeNumb.Value) Like "*" & [Forms]![RetCutOff]![txtOffNumb] & "*"));

Do I need to string multiple queries together to make this work, or is it just not possible?

View 6 Replies View Related

How To Update A Field In Subform When Main Form Is Data Entry

Sep 19, 2012

I have a mainform set to data entry to add records to TABLE1. I inserted a subform that shows fields from TABLE2. I have a field in TABLE2, let's say TBL2FLD1(NUMBER). I want to add TBL1FLD2(NUMBER) from TABLE1 in the mainform to TBL2FLD1 and update said field in TABLE2.

My problem is:

(1) I get a #TYPE! error when I try to add the two fields, which I have tried many, many ways (adding them together in the Default Value; creating an unbound field to hold the calculation and then putting that field into the Default Value of TBL2FLD1; ETC), and
(2) I don't know how to get the subform to update TABLE2. It seems like the control gets stuck in the subform. Is there a way to accomplish this without coding it?

View 3 Replies View Related

URGENT!!! Time Registry On User Entry

Nov 21, 2006

Hi I'm a newbie in access, i've read almos all of the threads posted

my problem is that I need to register times

for example
I ask for user number (this is an exlcusive number)
and by the time User clicks on Accept i need acces to record this time

user 19394 time 7:35 am (for example)

can this be done in access??

and another i need acces to display a pop-up message like

"User 19394 Jhon Smith
is this correct?"

can you help me

View 1 Replies View Related

Modules & VBA :: Inserting Field Value When Adding Record Using Data Entry Form?

Dec 14, 2014

I have a form for entry and some fields are computed or result of a query from another table. I have a function that looks up a value from another table like so

************************************************** ********
Public Function GetTargetType() As Variant
GetTargetType = DLookup("type", "tblFormulations", "[tblFormulations!formulation]=Forms![frmNmsConsumptionEntry]![formulation]")
End Function
************************************************** ********

Which works fine when I test in the immediate window.Then I have this form event. This however does not insert this value when I am adding records using my continuous form.

************************************************** ********
Private Sub Form_BeforeInsert(Cancel As Integer)
Me!target_group = GetTargetType()
'Forms!frmNmsConsumptionEntry!target_group = GetTargetType()
'[tblNmsConsumption.target_group] = GetTargetType()
End Sub
************************************************** ********

making sure I can insert this value once retrieved.

View 7 Replies View Related

Updating DB Only When User Clicks Save (and Not When Entry Fields Are Edited)

Oct 20, 2005

Hi,

I want to only save changes made to the DB row when the user clicks the Save button I created. I have some text boxes which currently are bound to different columns in the given row (ex: name, address).

Right now, changes are updated automatically when the form is closed or when focus moves to a different tab page.

Is there any simple way to do this? Currently all form input objects are bound to their respective columns (ex: name, address). Should they be bound, or should I just perform a query when the form opens to find the specified item then load the different fields into the proper text boxes.

Also, when I TAB through all my input boxes and the TAB focuses on my Tab Conrol Object the text boxes are automatically updated with the next item n the DB (next row). How can I prevent this?

Thanks!
DRT

View 1 Replies View Related

Open Tab Control For Data Entry When No Records In Table For User?

Nov 29, 2014

I am trying to open TabCtl86 forms in AddData mode if there are no records in a table for a user chosen form cboClientSearch. The tab control has three pages on it. At the moment I am getting an error saying "the form named '0' is either misspelled or doesn't exist".

I am using this at the moment; DoCmd.OpenForm Controls!TabCtl86, acFormDS, , , acFormAdd, acDialog

View 1 Replies View Related

Modules & VBA :: Save User Entry As Part Of Hyperlink Then Display In Subform

Nov 21, 2014

I have a form with multiple textboxes and comboboxes that allow for user entry, and a subform displaying a table, where the entries from the form are saved and can be retrieved. It's basically a way of creating new task entries and editing existing ones from a single interface.

One of the fields is an "issue number" of sorts, which is a 5-digit code that identifies the task. We have a website where details of each task are stored, and the URL format is akin to this: [URL] ....

The functionality that I'm hoping for is that when the user saves the record, it will be saved as the full link address, by concatenating the static first portion of the address and the code entered by the user. However, I need the table to still only display the code, not the whole link address, and will follow the full address when clicked in the subform table.

View 2 Replies View Related

Forms :: Fill A Form When User Write In Field

Apr 18, 2014

I need that in a form when I write in a determinate field check if exists and if exists fill all the fields in the form

How could I do it?

View 1 Replies View Related

Forms :: Restrict The User To Fill A Field On A Form?

Jul 5, 2013

I have two fields on a form. One of the fields has to be entered first in order for the other field to be filled. How can I restrict the user to enter a value in filed #2 before filling the filed #1?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved