MS Access Calendar
Collapse
This topic is closed.
X
X
-
Double clicking on the bottom box
ADezii
Is it possible to make a double click on a record that shows in the bottom LstEvent box to open my Training Events Detail to open to the record shown? I tried a typical macro to open the record by the ID but I get a function error.
I thought it would be nice to open a record that way if there was a date or other change that needed to be made.
ThanksComment
-
How do I get the form to open in dialog mode? The form is opening in the tab behind the Calendar where I can't get to it without closing the Calendar. It is, however, finding the right record.
When I tried:
Code:Cmd.OpenForm "Training Events Details", acNormal, , , , acDialog, "[ID] = " & Me![lstEvents].Column(0), acFormEdit
ThanksComment
-
Small bug
ADezii,
I found a small bug in the Double click event for the lstEvents box. If only one record shows in the box and I accidentally click on the open space below the record, but within the box, I get a run time error that says there is a Syntax error or missing operator in the query expression ID =
If I Choose End instead of Debug on the error message, the calendar stops functioning and I have to exit. Is there a way to fix this?Comment
-
Adezii,
I've kinda fixed the bug for now by adding an On Error GoTo statement so now a user will get a message to double click on the record instead of the runtime error.
Code:Private Sub lstEvents_DblClick(Cancel As Integer) On Error GoTo Error_lstEvents_dblclick DoCmd.OpenForm "Training Events Details", acNormal, , "[ID] = " & Me![lstEvents].Column(0), acFormEdit, acDialog Exit_lstEvents_dblclick: Exit Sub Error_lstEvents_dblclick: MsgBox "Please double click on the record.", vbInformation + vbOKOnly, "No Record Selected" Resume Exit_lstEvents_dblclick End Sub
ThanksComment
-
Code:Private Sub lstEvents_DblClick(Cancel As Integer) If Not IsNull(Me![lstEvents].Column(0)) Then DoCmd.OpenForm "Training Events Details", acNormal, , "[ID] = " & Me![lstEvents].Column(0), acFormEdit, acDialog Else MsgBox "You must Dbl-Click on a specific Record and not on an Emply Space " & _ "in the List Box", vbExclamation, "No Record Selected" End If End Sub
Comment
-
Populate temp table with Calendar form closed
ADezii
My Training Events Details form can be opened from my Main Events form or the Calendar. I've added a list box on the form that show all the records that occure on the date selected in the [Start Date] field. The data for the list box is drawn from the temp table. I chose the temp table because I like how your temp table splits up a record that contains start and end dates that spands several days. The list box is meant to act like a calendar day view. The only small draw is when the form is opened from my main form instead of the calendar and records are entered. These new records will not show in the listbox because they don't exist in the temp table. Is there away to repopulate the temp table on closing my Details form while the Calendar form is not open? I tried an append query but I didn't like the way it works because I found it I could end up with duplicate records. Especially if the form was open to a specific record to change a detail. The duplicates, of course, went away once I opened the calendar.
The tempory duplicates don't bother me, but I don't want to confuse any other person who may end up using this database.
ThanksComment
Comment