Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / January 2004

Tip: Looking for answers? Try searching our database.

2nd post, date stamp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nydia - 21 Jan 2004 13:40 GMT
I'm trying to create a database that keeps track of our
clients.

What I need help on is a questionaire that is filled out
by am employee about a client.  There is about 25 question
and the same questions are asked 4 different times (2
months after start date, 4months later, 6 months later
etc).  Start date is in another table. Right now, I have
the table set up with the following fields

clientID
Term (there are 4 terms, term 1= 2 months after start date
term 2=4months later etc)
date completed
q1
q2
q3
etc, etc
comments.

what i want is when the employee finishes all the
questions and comments for a date to automatically fill in
the date completed field, and for the employee not to be
able to change that date.  how can this be accomplished
and does the table structure look ok.

any help is greatly appreciated.

.
Scott McDaniel - 21 Jan 2004 14:18 GMT
Two methods come to mind:

1) If the user MUST complete this form entirely before saving, then just set
the Default value (in the table) of [date completed] = Now() or =Date()
2) If the user can start this record, then come back to it later to complete
it (and you want to store the date this record is finished), then you'll
need code to check this in your form's BeforeUpdate event:

Sub FormName_BeforeUpdate(Cancel = True)

If Not IsNull(Me.q1) And Not IsNull(Me.q2) etc etc Then
   Me![date completed] = Now()
End If

This should work, although you may wish to move it to the form's Current
event.

Note that unless you have secured your database (including your tables),
anyone can navigate to the tables and change any data they wish.
Signature

Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP

> I'm trying to create a database that keeps track of our
> clients.
[quoted text clipped - 25 lines]
>
> .
Nydia - 21 Jan 2004 19:32 GMT
I'm not really sure what this means and maybe, i'm not
explaining it correctly. This questionaire is going to be
filled out atleast 4 times for each client (if not more),
I eventually am going to do a report that will show all
the questionaires that were done in a specified month.  So
I would like to be able to see when the employee finished
the questionaire.  You gave codes but if i put =now() will
it update that date each time a client opens that
questionaire (what happens if i open it to review it, i
dont want the date to change)
>-----Original Message-----
>Two methods come to mind:
[quoted text clipped - 47 lines]
>
>.
Scott McDaniel - 21 Jan 2004 22:25 GMT
Setting the Default value would not change the date as you review this data,
as the Default value is only set one time - when the record is inserted.

If your questionairre will be filled out four times, you would need four
separate records of it (linked via your CustomerID, most likely) ...
therefore, when you add each of these four records, the [date completed]
field would be filled in ...

If you use method 2, just check the value of [date completed] before
attempting to update it:

If Not IsNull(Me![date completed]) Then Exit Sub

This would force the sub routine to exit if ANYTHING has been entered in the
field
Signature

Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP

> I'm not really sure what this means and maybe, i'm not
> explaining it correctly. This questionaire is going to be
[quoted text clipped - 69 lines]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.