1. I am making a form for taking in appointments, and when you press the "Cancel Appointment" button it asks if you are sure, then add the information from the appointment to another table, and deletes it from the current table. I want it to pop up another box, to ask for an initial, so I can add information about who canceled it to the cancellations table.
So, basically, I need code for taking user input through a pop-up, then storing it in a variable.
2. I currently use this code to filter a form when it opens:
Private Sub Command643_Click()
DoCmd.OpenForm "Blank Tutor", , , "First_Name = 'Bob'"
End Sub
I want to put multiple filters, but I haven't been able to figure it out. I also want to filter by Last_Name. How would I do that?
3. This one is a bit more tricky. I have a button on a form, the shows the cancellations for that tutor, but it shows all the cancellations on the form. I want that button to apply a filter the the form, similar to #2. I just want the filter to be dynamic, in that it will show based on the field currently selected.
I tried this:
Private Sub Command534_Click()
DoCmd.OpenForm "Cancellations", , , "First_Name = First_Name"
End Sub
This just shows all of the cancellation table. Basically, I am in a filtered form, and it is only displaying appointments for one tutor. I have a button for displaying the cancellations table(code above) but I want it to only show cancellations from the tutor that is currently filtered. Maybe something to reference the specific value of the currently selected record?
Thank you so much in advance guys.