Calender Planner

J

Jen

I have a calender I currently use for my FrmWhatDate. I use this calender a
lot. I want to take it a step further. I need to schedule appointments for
clients and I do not want to use OutLook. I want to create a table that is
named TblAppointment and it will have ID = Date clicked on in the calender
and each time I click on that date it will open only that record and allow me
to enter my clients for appointments.

Example:

ID = (Date Selected)
8:00AM = client ID
9:00PM = client ID

Now what I need help on is creating an row in a table for that specified
date by clicking on the calender and not creating duplicates.

Thanks......:)
 
A

Alex Dybenko

Hi,
I think you can use form, where you enter appointment, to create records in
a table. Idea is following: make this form, bind it to TblAppointment
here how you need to call it from your schedule form:

docmd.openform "EntryForm"
Forms("EntryForm").SetDate #07/15/2006# 'here you pass selected date

now in entry form make a new public sub with one parameter datSelected and
following code:

with me.recordsetclone
.findfirst "[Date]=#" & format(datSelected,"mm\/dd\/yyyy") & "#"
if .NoMatch then
me.[Date].DefaultValue=datSelected
me.[Date].SetFocus
docmd.gotorecord ,,acnewrecord
else
me.bookmark=.bookmark
endif
end with

so when you pass selected date - code will look for existing record of that
date, and if date not found - it will got to a new record

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
 
J

Jen

Alex I need to take one step back. I have a calender and I want to use the
calender to open the form with to enter the appointments but I can't seem to
be able to get my calender to interact with my form.

Alex Dybenko said:
Hi,
I think you can use form, where you enter appointment, to create records in
a table. Idea is following: make this form, bind it to TblAppointment
here how you need to call it from your schedule form:

docmd.openform "EntryForm"
Forms("EntryForm").SetDate #07/15/2006# 'here you pass selected date

now in entry form make a new public sub with one parameter datSelected and
following code:

with me.recordsetclone
.findfirst "[Date]=#" & format(datSelected,"mm\/dd\/yyyy") & "#"
if .NoMatch then
me.[Date].DefaultValue=datSelected
me.[Date].SetFocus
docmd.gotorecord ,,acnewrecord
else
me.bookmark=.bookmark
endif
end with

so when you pass selected date - code will look for existing record of that
date, and if date not found - it will got to a new record

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Jen said:
I have a calender I currently use for my FrmWhatDate. I use this calender
a
lot. I want to take it a step further. I need to schedule appointments
for
clients and I do not want to use OutLook. I want to create a table that
is
named TblAppointment and it will have ID = Date clicked on in the calender
and each time I click on that date it will open only that record and allow
me
to enter my clients for appointments.

Example:

ID = (Date Selected)
8:00AM = client ID
9:00PM = client ID

Now what I need help on is creating an row in a table for that specified
date by clicking on the calender and not creating duplicates.

Thanks......:)
 
A

Alex Dybenko

Hi,
for calendar control - you can use it Click event and then read selected
date:

docmd.openform "EntryForm"
Forms("EntryForm").SetDate me.MyCalendarControl.Value

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jen said:
Alex I need to take one step back. I have a calender and I want to use
the
calender to open the form with to enter the appointments but I can't seem
to
be able to get my calender to interact with my form.

Alex Dybenko said:
Hi,
I think you can use form, where you enter appointment, to create records
in
a table. Idea is following: make this form, bind it to TblAppointment
here how you need to call it from your schedule form:

docmd.openform "EntryForm"
Forms("EntryForm").SetDate #07/15/2006# 'here you pass selected date

now in entry form make a new public sub with one parameter datSelected
and
following code:

with me.recordsetclone
.findfirst "[Date]=#" & format(datSelected,"mm\/dd\/yyyy") & "#"
if .NoMatch then
me.[Date].DefaultValue=datSelected
me.[Date].SetFocus
docmd.gotorecord ,,acnewrecord
else
me.bookmark=.bookmark
endif
end with

so when you pass selected date - code will look for existing record of
that
date, and if date not found - it will got to a new record

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Jen said:
I have a calender I currently use for my FrmWhatDate. I use this
calender
a
lot. I want to take it a step further. I need to schedule
appointments
for
clients and I do not want to use OutLook. I want to create a table
that
is
named TblAppointment and it will have ID = Date clicked on in the
calender
and each time I click on that date it will open only that record and
allow
me
to enter my clients for appointments.

Example:

ID = (Date Selected)
8:00AM = client ID
9:00PM = client ID

Now what I need help on is creating an row in a table for that
specified
date by clicking on the calender and not creating duplicates.

Thanks......:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top