View Full Version : Question Access Basics


sirnoob
08-29-2008, 02:32 AM
hey,

i am in need of help with a problem with access, I have limited knowledge and this will be my first real world use for the program. i have read afew things online but am still stuck. this will probbly be really easy to answer :)
ok here is my attempt to explain what i am trying to do.

lets say i have a table called "Clients" in this table i have ProjectID(primary key), LastName, FirstName, Age, Location. etc.
what i need to know is if i enter say:
ProjectID(primary key): 100
LastName: Riley
FirstName: Steve
Age: 33
Location: Here or There

and he was infact only 30 how would i go about editing this entry without to much effort to the final user? (this is just an example, but i know people will make typos)
i plan to make the final UI with vb if possiable. so is it possiable?

statsman
08-29-2008, 02:53 AM
I generally go with two forms for each area of a database.
The first form is set to data entry which brings up a new blank form for a new record whenever it is opened.
The second form is used to edit the information. I use a search function to find the correct record to update.

Dennisk
08-29-2008, 05:25 AM
never enter a persons age into a database as it is out of date by the next day. Enter the DOB and calculate the current age as and when required.

here is a standard age function


Public Function CalcAge(DOB) As Integer
Dim CompareDate As Date
CompareDate = Date
If Not IsNull(DOB) Then
CalcAge = Year(CompareDate) - Year(DOB) + (DateSerial(Year(CompareDate), Month(DOB), Day(DOB)) > CompareDate)
End If
End Function