hi,
i have a calendar with drawn arrows, with which to show info about bookings. i have a "refresh" button for the form with the drawings, to repaint the arrows depending on changes in tables. this is working fine.
however, i also have a datepointer, a textbox with a date, as a reference point for which days to draw into the calendar. hope this makes ok sense. the problem arises when i attempt to call the makeArrows() module (which redraws the calendar) from the _Change() or _AfterUpdate() event of the textbox w the date. it wont refresh.
the drawing-board is located on a subform in a mainform. the "refresh"-button is located on the mainform (and working perfectly, calling the makeArrows() function). the textbox with date is located on the mainform.
the end of the makeArrows function (the refresh part) looks like this:
i suspect it perhaps has something to do with makeArrows() closing the mainform and reopening it, while it still hasnt returned to the sub-event of the textbox...? but then it's weird that the command button which simply calls makeArrows does work...
any ideas?
additionally, if i put the "call makeArrows" in the Text141_Exit(Ca ncel as Integer), i get a 2585, "this action cant be carried out while processing a form or report event," which kinda makes sense. but why only in _Exit()? and so on...
any input would be greatly appreciated!
thanks!
i have a calendar with drawn arrows, with which to show info about bookings. i have a "refresh" button for the form with the drawings, to repaint the arrows depending on changes in tables. this is working fine.
however, i also have a datepointer, a textbox with a date, as a reference point for which days to draw into the calendar. hope this makes ok sense. the problem arises when i attempt to call the makeArrows() module (which redraws the calendar) from the _Change() or _AfterUpdate() event of the textbox w the date. it wont refresh.
the drawing-board is located on a subform in a mainform. the "refresh"-button is located on the mainform (and working perfectly, calling the makeArrows() function). the textbox with date is located on the mainform.
the end of the makeArrows function (the refresh part) looks like this:
Code:
'last working solution to refresh problem.... strMainForm = "Calendar" DoCmd.Close acForm, strMainForm, acSaveYes DoCmd.OpenForm strMainForm, acNormal ctr = "ctrCanvas" Forms!Calendar!(ctr).SourceObject = "frmCanvas" 'clean up '******** DoCmd.Echo (True) Set RecSetBookings = Nothing Set RecSetRooms = Nothing Exit Function Error_Handler: MsgBox Err.Number & ", " & Err.Description & ", " & Err.Source & ". bID = " & rcBookID End Function
any ideas?
additionally, if i put the "call makeArrows" in the Text141_Exit(Ca ncel as Integer), i get a 2585, "this action cant be carried out while processing a form or report event," which kinda makes sense. but why only in _Exit()? and so on...
any input would be greatly appreciated!
thanks!
Comment