• WSgrozy

    WSgrozy

    @wsgrozy

    Viewing 15 replies - 31 through 45 (of 45 total)
    Author
    Replies
    • in reply to: Open from Template (2003 SP2) #933371

      I’m getting closer on this. The word document opens now correctly (not the template) but still having problems. I’m using mail merge with the template. After populating the a merged table, access opens a new word document using the merged template. When access opens the document I still see all the field codes and can’t remove them, but when I open the document manually its correct with the proper data in place of the field codes. I’ m setting the merge up without code, perhaps that’s where my problem is. Any suggestions would be appreciated.

    • in reply to: Open from Template (2003 SP2) #932618

      Sorry HansV, in VB. I shoplifted this off one of the post. This currently opens just the template.

      dim strworddoc as string
      ‘template
      strWordDoc = “H:DBsNAVSHIPYRDSS.dot”
      ‘Create a Word instance
      Set appWord = CreateObject(“Word.Application”)
      appWord.Visible = True
      ‘Open the selected merge document
      appWord.Documents.Open strWordDoc

    • in reply to: Replace piece of memo field (2003) #930889

      Thanks again HansV.

    • in reply to: Replace piece of memo field (2003) #930887

      HansV, can this expression be strung together allowing multiple replacements within one query of the same field. Having trouble making that work.

    • in reply to: Replace piece of memo field (2003) #929285

      Thanks much, Hans. Works perfect

    • in reply to: MS HTML Help (A2K SR1) #760909

      Works great when using the F1 Key only. When using “What’s This” i’ve prevented the access window from showing somehow, but a “msohelp.exe” is being opened hidden. No affect to users, but that application being opened prevents me from compiling the help file. I must go into task manager and end the application manually. Not so much a big deal. Tried to apply the same logic in the reference you provided but not sure “What’s This” has a macro name. I would have thought it was the equivelent of pressing F1, guess not.

    • in reply to: MS HTML Help (A2K SR1) #760910

      Works great when using the F1 Key only. When using “What’s This” i’ve prevented the access window from showing somehow, but a “msohelp.exe” is being opened hidden. No affect to users, but that application being opened prevents me from compiling the help file. I must go into task manager and end the application manually. Not so much a big deal. Tried to apply the same logic in the reference you provided but not sure “What’s This” has a macro name. I would have thought it was the equivelent of pressing F1, guess not.

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #754895

      Hans, thanks works like a champ.

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #754896

      Hans, thanks works like a champ.

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #752892

      I’ve narrowed it down to one specific control on a user common form that I’d like to prevent the shutdown from occuring if keypress or mousemove. Could you provide an example of an event handler which would reset the time established on my inactive form shutown(provided in earlier post). Thanks.

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #752893

      I’ve narrowed it down to one specific control on a user common form that I’d like to prevent the shutdown from occuring if keypress or mousemove. Could you provide an example of an event handler which would reset the time established on my inactive form shutown(provided in earlier post). Thanks.

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #752864

      The database I have tracks usage and is considered sensitive. Many of my users are complacent so I setup an inactive shutdown based off of how long a control has been active. But now when users may be reading something or entering data within one control the system shuts them down. I like it to shutdown on only the active machine. I have the below associated with a specific form which is hidden when a user enters the system.

      Option Compare Database
      Option Explicit
      Const conSeconndsPerMinute = 60
      Dim sngStartTime As Single
      Dim ctlSave As Control
      Dim intMinutesUntilShutDown As Integer
      Dim intMinutesWarningAppears As Integer

      Private Sub Form_Close()
      On Error Resume Next
      ctlSave = Nothing
      End Sub

      Private Sub Form_Open(Cancel As Integer)
      ‘* Set this variable to the number of minutes of inactivity
      ‘* allowed before the application automatically shuts down.
      intMinutesUntilShutDown = 5
      ‘* Set this variable to the number of minutes that the
      ‘* warning form will appear before the application
      ‘* automatically shuts down.
      intMinutesWarningAppears = 1
      Me.Visible = False
      sngStartTime = Timer
      End Sub

      Private Sub Form_Timer()
      ‘**********************************************************************
      ‘* This timer event procedure will shut down the application
      ‘* after a specified number of minutes of inactivity. Inactivity
      ‘* is measured based on how long a control remains the ActiveControl.
      ‘**********************************************************************
      Dim sngElapsedTime As Single
      Dim ctlNew As Control
      On Error Resume Next
      Set ctlNew = Screen.ActiveControl
      If Err 0 Then
      ‘* No activecontrol
      sngElapsedTime = Timer – sngStartTime
      Else
      If ctlNew.Name = “InactiveShutDownCancel” Then
      ‘* The warning form has appeared, and the cancel button
      ‘* is the active control
      sngElapsedTime = Timer – sngStartTime
      Else
      If ctlNew.Name = ctlSave.Name Then
      ‘* Still at same control
      sngElapsedTime = Timer – sngStartTime
      Else
      ‘* Some change has occured, we’re at a new control
      Set ctlSave = ctlNew
      sngStartTime = Timer
      End If
      If Err 0 Then
      Set ctlSave = Screen.ActiveControl
      End If
      End If
      End If
      Err.Clear
      Set ctlNew = Nothing
      ‘Debug.Print ” active control=” & ctlNew.name & ” elapsed=” & sngElapsedTime
      Select Case sngElapsedTime
      Case Is > (intMinutesUntilShutDown * conSeconndsPerMinute)
      ‘MsgBox “QUIT”
      Set ctlSave = Nothing

      Case Is > ((intMinutesUntilShutDown – intMinutesWarningAppears) * conSeconndsPerMinute)
      ‘* Make the warning form visible
      Me.Visible = True
      Case Else
      ‘* The next line can be commented out if the form is opened hidden
      ‘Me.Visible = False
      End Select
      Exit_Section:
      End Sub

      Private Sub InactiveShutDownCancel_Click()
      sngStartTime = Timer
      Me.Visible = False
      End Sub

    • in reply to: Shutdown on inactiviy (Access 2K SP1) #752865

      The database I have tracks usage and is considered sensitive. Many of my users are complacent so I setup an inactive shutdown based off of how long a control has been active. But now when users may be reading something or entering data within one control the system shuts them down. I like it to shutdown on only the active machine. I have the below associated with a specific form which is hidden when a user enters the system.

      Option Compare Database
      Option Explicit
      Const conSeconndsPerMinute = 60
      Dim sngStartTime As Single
      Dim ctlSave As Control
      Dim intMinutesUntilShutDown As Integer
      Dim intMinutesWarningAppears As Integer

      Private Sub Form_Close()
      On Error Resume Next
      ctlSave = Nothing
      End Sub

      Private Sub Form_Open(Cancel As Integer)
      ‘* Set this variable to the number of minutes of inactivity
      ‘* allowed before the application automatically shuts down.
      intMinutesUntilShutDown = 5
      ‘* Set this variable to the number of minutes that the
      ‘* warning form will appear before the application
      ‘* automatically shuts down.
      intMinutesWarningAppears = 1
      Me.Visible = False
      sngStartTime = Timer
      End Sub

      Private Sub Form_Timer()
      ‘**********************************************************************
      ‘* This timer event procedure will shut down the application
      ‘* after a specified number of minutes of inactivity. Inactivity
      ‘* is measured based on how long a control remains the ActiveControl.
      ‘**********************************************************************
      Dim sngElapsedTime As Single
      Dim ctlNew As Control
      On Error Resume Next
      Set ctlNew = Screen.ActiveControl
      If Err 0 Then
      ‘* No activecontrol
      sngElapsedTime = Timer – sngStartTime
      Else
      If ctlNew.Name = “InactiveShutDownCancel” Then
      ‘* The warning form has appeared, and the cancel button
      ‘* is the active control
      sngElapsedTime = Timer – sngStartTime
      Else
      If ctlNew.Name = ctlSave.Name Then
      ‘* Still at same control
      sngElapsedTime = Timer – sngStartTime
      Else
      ‘* Some change has occured, we’re at a new control
      Set ctlSave = ctlNew
      sngStartTime = Timer
      End If
      If Err 0 Then
      Set ctlSave = Screen.ActiveControl
      End If
      End If
      End If
      Err.Clear
      Set ctlNew = Nothing
      ‘Debug.Print ” active control=” & ctlNew.name & ” elapsed=” & sngElapsedTime
      Select Case sngElapsedTime
      Case Is > (intMinutesUntilShutDown * conSeconndsPerMinute)
      ‘MsgBox “QUIT”
      Set ctlSave = Nothing

      Case Is > ((intMinutesUntilShutDown – intMinutesWarningAppears) * conSeconndsPerMinute)
      ‘* Make the warning form visible
      Me.Visible = True
      Case Else
      ‘* The next line can be commented out if the form is opened hidden
      ‘Me.Visible = False
      End Select
      Exit_Section:
      End Sub

      Private Sub InactiveShutDownCancel_Click()
      sngStartTime = Timer
      Me.Visible = False
      End Sub

    • in reply to: PC Name/Network Name (Access 2000) #746220

      much thanks

    • in reply to: PC Name/Network Name (Access 2000) #746221

      much thanks

    Viewing 15 replies - 31 through 45 (of 45 total)