By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

How to build a form for a time shedule

P: n/a
I need to build a form used by each employee to enter the visits for
each day
I have built a table consisting of the following rows

CallId
Client
CallDate
CallTime
Subject

I imagine the form to look like this:
===================
Monday 01.01.2005

Time Client Subject

9.000 ABC giving an offer
10.00 ABD good will
==================================
etc etc

I have difficulties in building the form, since i want the form to
display each separate day.
But i cannot do it. This is because the date is not an Autonumber,i.e.
it is not unique
and i cannot open it for a new day, or find a previous day.I think i
have something
basicaly wrong with my conception .For example, how shall i open the
form for a new day, and how can

i find a previous day? i will be grateful for any help. Is there by
chance any template i could use ?
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I'd use 2 tables
tblCall
callId (pk) (autonumber)
callDate

tblCallDetail
callId (pk) (fk)
visitNo (pk) (autonumber)
callTime
client
subject

then I'd build a tabular form for callDetail
then I'd build a columnar form for call, with a subform of callDetail

pr******@hotmail.com (Primerov) wrote in message news:<4a**************************@posting.google. com>...
I need to build a form used by each employee to enter the visits for
each day
I have built a table consisting of the following rows

CallId
Client
CallDate
CallTime
Subject

I imagine the form to look like this:
===================
Monday 01.01.2005

Time Client Subject

9.000 ABC giving an offer
10.00 ABD good will
==================================
etc etc

I have difficulties in building the form, since i want the form to
display each separate day.
But i cannot do it. This is because the date is not an Autonumber,i.e.
it is not unique
and i cannot open it for a new day, or find a previous day.I think i
have something
basicaly wrong with my conception .For example, how shall i open the
form for a new day, and how can

i find a previous day? i will be grateful for any help. Is there by
chance any template i could use ?

Nov 13 '05 #2

P: n/a
pr******@hotmail.com (Primerov) wrote in message news:<4a**************************@posting.google. com>...
I need to build a form used by each employee to enter the visits for
each day
I have built a table consisting of the following rows

CallId
Client
CallDate
CallTime
Subject

I imagine the form to look like this:
===================
Monday 01.01.2005

Time Client Subject

9.000 ABC giving an offer
10.00 ABD good will
==================================
etc etc


CAKE. You just have to do one thing... Create a table of dates.
Something like

CREATE TABLE tblCalendar(
CalendarDate DATE PRIMARY KEY);

And then you could populate it with some code...

Public Sub FillCalendar(byval dtStart As Date, byval dtFinish As Date)
dim db as dao.database
dim rs as dao.recordset
dim dtThis as date

set db=dbengine(0)(0)
set rs = db.OpenRecordset("tblCalendar",dbOpenTable)

'be sure to check if dtStart<=dtFinish...
for dtThis = dtStart to dtFinish
rs.AddNew
rs.Fields("CalendarDate")=dtThis
rs.Update
next dtThis

rs.close
set rs=nothing
set db=nothing

End Sub

Oh, and add some nice error trapping...

Okay, now that we have a populated table... Create a Main/Subform.
Main's source is tblCalendar, and the sub's source is
"tblAppointments". Join the two tables. (Put Date and Time in
separate fields, or you won't be able to do the join!) Then just sort
the subform on the time field, and you're done.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.