Cancel appointment

ICTkirsten

Registered User.
Local time
Today, 19:37
Joined
Jan 3, 2015
Messages
137
Hi :)

I wanted to know how i could create a form that cancels an appointment i guess through a query..

can someone give me some advice please


Thank you :)
 
Define "Cancel an Appointment". What happens to the record in the table when an appointment is marked to be cancelled?
 
You don't (should not) need a separate form for cancelling appointments. There should be a list of all the appointments (a continuous form or a listbox), and there should be a button for editing and another for deleting. Or if you click (double-click) the line for an appointment, it opens a small form for editing the appointment and from this form you should also be able to delete, cancel, or anything else. I would make this form unbound and when you save (or delete), you can execute a SQL statement like

UPDATE tblAppointments SET AptDate = #" & Nz(Me!AptDate) & "# WHERE AptID = " & CStr(Me!AptID)

DELETE * FROM tblAppointments WHERE AptID = " & CStr(Me!AptID)

I just made up field names above for the demo.

Shoji
 
Heya, I'm trying to d that now.. What would the cstr represent? Is it a form name?
 
CStr is a function to convert a number into a string. A SQL string is a string and you should not concatenate a number to a string directly, even though that will work anyway.
Look for it in Google.
I would be happy to follow up with the rest, but for now I have to go away from the computer.

Shoji
 

Users who are viewing this thread

Back
Top Bottom