Simple database

yaro

New member
Local time
Today, 19:47
Joined
May 24, 2010
Messages
5
I'm a complete beginner and I'd like to create a database that will first of all check the date and treat every Monday as the beginning of the week. This is crucial as I have some testing to do over the week on various companies so it doesn't really matter what day it is exactly. It only matters that I check all of the companies over a week starting from Monday finishing Friday every week. Obviously I've got no idea how to implement such a functionality to my little database. The only records in this database will be Company and Checked_By. So I've got my little table with all of the companies that I or my collogue will be running checks on with this 2 records. How do I go about doing that Week_Starting where I should have a date of whichever Monday? I can create the Date record and type it in manually every time but it would be much nicer if this was filled in automatically in some way so in the end I just select a company from all available and then select my name in the next field.
yaro
 
First of all, you way want to get some basic VBA skills. Do a quick Google search and some VBA primers or tutorials.

That being said, you will probably find the Weekday Function to be helpful.
It can take a given date and determine what day of the week it is.

If you want a date field to default to today's date, change the field's default value to: Date()
 
So you're saying I need some code to do what I want to do. OK but I didn't know you can insert code into a database. I've seen the Date field in Design view but since it wasn't exactly what I was after I thought maybe I was looking int the wrong place in Access. I can't see anywhere to place any code though. Thanks.
yaro
 
What evanscamman has given you is usually used to make a calculated field in a query

MyFieldName:Weekday([FieldName for date field])

Date() is entered in a similar way. You can also combine things

Weekday(Date())

Such fucntions are also used as the data source for unbound text boxes and in that case you place an = sign first. Thus =Weekday(Date()) entered as the data source for display weekday as a number. Today, Wednesday will show as a 4, and that is because the computers are set for Sunday being the 1st day of the week.

You can change the computer but I would prefer to treat day 2 (monday) as the first day.

If you search the site, especially in the Query and VBA forums for any thing "date" related you turn up heaps of stuff. Also Google. Access has lots of functions plus doing things in combination that can probably achieve anything in the world of dates and times you can think of.
 
Hoped my simple database will be simpler to create LOL. I haven't get to the topic of queries yet so what you're saying about calculated fields although sounds sensible doesn't really tell me how can that be achieved with my current knowledge of Access (read: pretty poor knowledge). No worries though, I'll get there. I searched the forum for Date() function and although there were some threads on this topic there were much to complex for me to understand. It looks like I've got lots of reading before I can get my "simple" database done.
yaro
 
Hoped my simple database will be simpler to create LOL. I haven't get to the topic of queries yet so what you're saying about calculated fields although sounds sensible doesn't really tell me how can that be achieved with my current knowledge of Access (read: pretty poor knowledge). No worries though, I'll get there.

One make a of list of a few things you can do in Access whereby if you maseter them and havin not much of anything else you can still make a very good data base that will do a lot.

Creating fields in queries and unbound text boxes using built in Acces functions and formulas would certainly be two items on such a list.
 

Users who are viewing this thread

Back
Top Bottom