A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

help with coding a form



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2008, 07:44 PM posted to microsoft.public.access.forms
Rick Wright
external usenet poster
 
Posts: 1
Default help with coding a form

GlacierHi -

I'm just starting to learn access and need some assistance with my project.
I'm trying to design a db to track the login and logout times of users. My
concept is to have a form linked to a table that contains the member#, Name,
logintime and logouttime. This form will have only two command buttons: 1.
Login 2. Logout. When 1 or 2 is clicked the user will be prompted to
enter their name and a new record will be created for the member with date
and time recorded. Then I can create a report that will show the members
login/logout information.

I don't know how to code the event procedure. I tried creating a macro that
runs a query, but it fails when trying to setvalue to the login field. I
know that there must be a better way. Any and all assistance would be
appreciated.

- Rick


  #2  
Old May 10th, 2008, 09:23 AM posted to microsoft.public.access.forms
Jason[_25_]
external usenet poster
 
Posts: 126
Default help with coding a form

Just use a form - allow additions but not deletions. Not sure if no edits
would work. Someone will post with correct procedure.
"Rick Wright" wrote in message
est...
GlacierHi -

I'm just starting to learn access and need some assistance with my

project.
I'm trying to design a db to track the login and logout times of users.

My
concept is to have a form linked to a table that contains the member#,

Name,
logintime and logouttime. This form will have only two command buttons:

1.
Login 2. Logout. When 1 or 2 is clicked the user will be prompted to
enter their name and a new record will be created for the member with date
and time recorded. Then I can create a report that will show the members
login/logout information.

I don't know how to code the event procedure. I tried creating a macro

that
runs a query, but it fails when trying to setvalue to the login field. I
know that there must be a better way. Any and all assistance would be
appreciated.

- Rick




  #3  
Old May 10th, 2008, 03:09 PM posted to microsoft.public.access.forms
Pete D.[_3_]
external usenet poster
 
Posts: 488
Default help with coding a form

With a small combination of modules you can,
1. extract user network logon name and system
http://www.mvps.org/access/api/api0008.htm
http://www.mvps.org/access/api/api0009.htm

3. grab date/time
With CodeContextObject
.DateModified = Date
.TimeModified = Time()
.UserLogon = fOSUserName()
.MachineName = fOSMachineName()
End With

Automate updating a record in a logn table
Fire all these events with a timed startup form, (splash screen) or an
autoexec macro so no user intervention required, totally seamless.



"Jason" wrote in message
...
Just use a form - allow additions but not deletions. Not sure if no edits
would work. Someone will post with correct procedure.
"Rick Wright" wrote in message
est...
GlacierHi -

I'm just starting to learn access and need some assistance with my

project.
I'm trying to design a db to track the login and logout times of users.

My
concept is to have a form linked to a table that contains the member#,

Name,
logintime and logouttime. This form will have only two command buttons:

1.
Login 2. Logout. When 1 or 2 is clicked the user will be prompted to
enter their name and a new record will be created for the member with
date
and time recorded. Then I can create a report that will show the members
login/logout information.

I don't know how to code the event procedure. I tried creating a macro

that
runs a query, but it fails when trying to setvalue to the login field. I
know that there must be a better way. Any and all assistance would be
appreciated.

- Rick






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.