Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Activate disabled when making form Pop Up. Why?

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
0
0
US
Hey there all,

I have a form that I use to close helpdesk tickets that calculates the time spent on the ticket. I decided a few weeks ago to allow the users to have all the forms in the database be pop ups instead of the normal form. This allows the user to shrink the Database window down and use the forms as if they were windows on the desktop. However when I did this the On Activate property stopped working. the code I was using is

Private Sub cmdClsTkt_Click()
On Error GoTo Err_cmdClsTkt_Click


TimeSpent = txtMin
CloseIssue = 1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

Exit_cmdClsTkt_Click:
Exit Sub

Err_cmdClsTkt_Click:
MsgBox Err.Description
Resume Exit_cmdClsTkt_Click

End Sub

Private Sub cmdCancel_Click()
On Error GoTo Err_cmdCancel_Click


CloseIssue = 1
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
DoCmd.Close


Exit_cmdCancel_Click:
Exit Sub

Err_cmdCancel_Click:
MsgBox Err.Description
Resume Exit_cmdCancel_Click

End Sub

Private Sub Form_Activate()

DTClosed = Now()
txtMin = DateDiff("n", [DTStart], [DTClosed])



End Sub

I can put a command button in that will do the calculating for us but I would prefer the auto calculation that I had before.

Any Ideas?

Krash

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top