I need to create an appointment creator?

wazdaman

Registered User.
Local time
Today, 13:41
Joined
Dec 27, 2005
Messages
19
hi

i need to create and appointment creater.

basically i want acalendar where you select your day and another calendar for the time. this should then automatically be put into next appoint ment label for the patient.

my situation is this:

i have a table "tblpatientdata" and a form "frmpatientdata" and on that form i want to put command button which takes you to a form which contains some sub forms that choose theday and time and then you click OK and it should update the next appointment section.

i dont knw how to do this and i do not want to make it too complex but could some one help me or give me a different easier idea....

thanx
 
I didn't create this, but it has date and time. I am uploading a blank database with only the calendar and its events.

HTH.

PS, the form load event for this calendar allows you the option to say whether the time is needed. You can change that if you need the time every time the calendar form is called.
 

Attachments

at the start on the on load an error comes and when i click ok an error comes and for me to full understand this i think i will need the stuff before and sfter the calendar

thanx though its the best calendar ive got so far.
 
wazdaman said:
at the start on the on load an error comes and when i click ok an error comes and for me to full understand this i think i will need the stuff before and sfter the calendar

thanx though its the best calendar ive got so far.

Yes, our form has an option to show the time or not show the time. I would suggest commenting out those lines of code, and it should work for you from there.
 
The first problem occurs in the below code at the calendar part which i have written in caps.

Private Sub Form_Load()

Dim ctl As Control

On Error GoTo Handle_Error

If CALENDAR.NeedCalendar = False Then
Me.clnCalendar.Enabled = False
End If

If Calendar.NeedClock = False Then
For Each ctl In Me.Controls
If TypeOf ctl Is ListBox Or TypeOf ctl Is TextBox Then
ctl.Enabled = False
End If
Next
End If

Me.clnCalendar.Value = Date

Exit Sub

Handle_Error:
MsgBox "The following error has occurred: " & Err.Description
Exit Sub

End Sub

The second problem occurs once i have pressed OK at the calendar part which i have also typed in caps.

Private Sub cmdOK_Click()

On Error GoTo Handle_Error

If Me.txtTime.Enabled = True Then

If IsNull(Me.txtTime.Value) Or Me.txtTime.Value = "" Then
MsgBox "You must select a time.", vbInformation, "Value Required"
Else

If CALENDAR.NeedCalendar = True Then
Calendar.NewCalendarDate = Me.clnCalendar.Value
End If

Calendar.NewCalendarTime = Me.txtTime.Value
Calendar.PopulateControl
DoCmd.Close acForm, Me.Name

End If

Else

Calendar.NewCalendarDate = Me.clnCalendar.Value
Calendar.PopulateControl
DoCmd.Close acForm, Me.Name

End If

Exit Sub

Handle_Error:
MsgBox "The following error has occurred: " & Err.Description
Exit Sub

End Sub

Could you tell me what to do to make it fully functional

thanx
 
IN MY CALENDAR THINGY i also need a time whih only displays the available times so there are no douuble bookings..
i am thinking of doing this as a sub form but do not knw anything about sub forms.
 
Like I said I didn't creat this. I am pasting below the code for the date and time class. Add this time to the attached database and see if that helps.


Code:
Option Compare Database
Option Explicit

Dim dtmDate As Date
Dim dtmTime As Date
Dim strFormName As String
Dim strTextFieldName As String
Dim blnShowCalendar As Boolean
Dim blnShowClock As Boolean

Public Property Get CalendarDate()
    CalendarDate = dtmDate
End Property

Public Property Get CalendarTime()
    CalendarTime = dtmTime
End Property

Public Property Get CalendarDateAndTime()
    CalendarDateAndTime = dtmDate & " " & dtmTime
End Property

Public Property Get FormName()
    FormName = strFormName
End Property

Public Property Get TextFieldName()
    TextFieldName = strTextFieldName
End Property

Public Property Get NeedCalendar()
    NeedCalendar = blnShowCalendar
End Property

Public Property Get NeedClock()
    NeedClock = blnShowClock
End Property

Public Property Let NewCalendarDate(NewDate As Date)
    dtmDate = NewDate
End Property

Public Property Let NewCalendarTime(NewTime As Date)
    dtmTime = NewTime
End Property

Public Sub Show(ShowCalendar As Boolean, ShowClock As Boolean, FormName As String, _
    TextFieldName As String)
    
    strFormName = FormName
    strTextFieldName = TextFieldName
    blnShowCalendar = ShowCalendar
    blnShowClock = ShowClock

    DoCmd.OpenForm "frmCalendar"

End Sub

Public Sub PopulateControl()

    If blnShowCalendar = True And blnShowClock = True Then
        Forms(Me.FormName).Controls(Me.TextFieldName).value = dtmDate & " " & dtmTime
    ElseIf blnShowCalendar = True And blnShowClock = False Then
        Forms(Me.FormName).Controls(Me.TextFieldName).value = dtmDate
    ElseIf blnShowCalendar = False And blnShowClock = True Then
        Forms(Me.FormName).Controls(Me.TextFieldName).value = dtmTime
    End If

End Sub
 
wazdaman said:
IN MY CALENDAR THINGY i also need a time whih only displays the available times so there are no douuble bookings..
i am thinking of doing this as a sub form but do not knw anything about sub forms.
For that, the other gurus will need to help.

I hope what I have done so far helps, and I am sure others on here can help elaborate more.
 
sorry but i dont knw where to put the code anyway ill try to disable the errors and then ill see from there

anyway if there is someone else available to give me some ideas then i am looking forward to reading the new posts...
 
wazdaman said:
sorry but i dont knw where to put the code anyway ill try to disable the errors and then ill see from there

anyway if there is someone else available to give me some ideas then i am looking forward to reading the new posts...

That class code I just gave you should be in a mod by itself. It is a class Module.

Create a new class module and copy and paste it in there. If necessary, I can add it to the database and post it here.

Will do that add to new post.
 
did you test it because it doesn't seem to still work anyway i am not too bothered and htnak you for your help
 
wazdaman said:
did you test it because it doesn't seem to still work anyway i am not too bothered and htnak you for your help


Yes, I saw that after I posted it on here. The others should be able to help you.

If you would please post your database on here with the form, I can work on it tonight and get back with you tomorrow.

I need to actually see your form.
 
hey

i have found many calendars that also display time but do not knw which one to choose.

i want on my patient information form a command button which says Create appointment

i want this command to open up the calendar where you choose the doctor and then the day and time once this is done u click OK which adds the info into the next appointment label with doctor name.

in the form which chooses the appointment i want to choose doctor name and when u choose the name the day section and time section should update showing the days which the doctor is able to take appointments and then once clicked on the day the time section should update showing the times available.

i have got a calender which does some of this but i need to put in the doctor section and then the two updates once this is done i think im complete.

the attachment displayed is the calendar but has some errors as i didn't create it i dont knw how to fix it could some one fix it and creat a combo box for doctors and then the updates for me as i do not knw how to do it

in the attachment there are 2 tables doctor and patient and there are only 2 forms the calendar and the patient info i think this is all you need and should be a simple task but if its easier for you to explain to me how to do it then please do so

thanxx
 

Attachments

in the attachment above i have only posted the things which you will need and the rest of the database is not there but there is no connection the the rest of database so you will not need it.

THANK YOU
 
wazdaman said:
in the attachment above i have only posted the things which you will need and the rest of the database is not there but there is no connection the the rest of database so you will not need it.

THANK YOU

Yes, I understand all about HIPAA laws. I work for an insurance company. I am taking it home and will look at it. If you get help before I can get back to you, I will look at this as a learning experience.

We are all still learning in some way or another.

PS, apparently more classes are used in his calender. I will add all that are necessary and let you know.
 
Thank you

i will be looking forward to downloading that attachment tommorow...
 
Sure for a nominal fee. Perhaps your first born...or even better yet mine. HAHA...Just kidding. ;) :D

I will work on, and see what I can do. I am still a newbie myself, but this helps me too. :cool:
 
ive donwloaded that link and have taken it into account and it not much towards what i need its a bit over the top i dont want mine to be really complex
 

Users who are viewing this thread

Back
Top Bottom