Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden Field Capture? - Is it Possible

Status
Not open for further replies.

jpe2007

Technical User
Oct 2, 2007
11
CA
Good morning, I have a real simple database to capture feedback from my team. One table that holds the following fields:

Date
Time
Person
Suggestion
ID

My questions are the following:

1. To avoid having the rep enter the actual date and time my understanding is that I can have access pick that up from the computer they are working on directly. If this is true how do I automate those fields to populate the computers date and time directly without user input?

2. Each person that logs into their computer has an id. How do I get access to automatically pick up their id from the computer and parse it into the table under the ID column for each request? The input will be coming from a form so I guess I'm asking if there is code I can put in the form that when people hit submit the form knows to translate that id into that field.

I really do appreciate everyones help for what I am sure is a very simple solution.
 
1. in table (design view) set the default value of the date column to Date(), in the Time Column set the default to Time(), if you have only one column, for date/time then set the default to Now()

2. see
Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
or to save date/time only when a record is edited or newly added (date & time do not directly show as default does), copy/paste the following in the forms [blue]Before Update[/blue] event:
Code:
[blue]   Me![purple][b][i]DateFieldName[/i][/b][/purple] = Date()
      Me![purple][b][i]TimeFieldName[/i][/b][/purple] = Now()[/blue]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thank you both for your responses. KenReay as it relates to bullet #2 I have looked at the code and understand what to call the function however the recommendation to name the module?

What is the module they are referencing? Where do you recommend pasting the code on the Send button On Click feature.

Thanks.

 
They are suggesting you put all of the code in the example in a module, and save the module with a suitable name for example mdlNetWorkUserId.

Once you have done that, the function fOSUserName() will be available (ie will be in scope) from anywhere in your application.

OK?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top