I use .visible=true in most load events to control when the form becomes visible.
This works well except for a couple of particular cases.
If I run the software in develop mode or click the accde file all is good.
If I run it from a shortcut with windows minimized then a couple of the procedures run but do not become visible.
The procedure below is one such example.
In this case, because there as a button to click, it seems like the software has stalled.
If I click on the 'Access" icon on the task bar the form is there waiting for input. Clicking a button causes the procedure to run it's course without further ado.
If I do not select this particular procedure, the rest of the system runs without a hitch.
This is a recent development and a scan through the options has revealed no possible causes.
The images show the "Backup" procedure is running whilst not visible, the login screen functioning normally and the form mentioned above after clicking the Access icon.
"Option Compare Database" and "Option Explicit" are mandatory in all of my procedures, I just didn't select them in this case.
"
This works well except for a couple of particular cases.
If I run the software in develop mode or click the accde file all is good.
If I run it from a shortcut with windows minimized then a couple of the procedures run but do not become visible.
The procedure below is one such example.
In this case, because there as a button to click, it seems like the software has stalled.
If I click on the 'Access" icon on the task bar the form is there waiting for input. Clicking a button causes the procedure to run it's course without further ado.
If I do not select this particular procedure, the rest of the system runs without a hitch.
This is a recent development and a scan through the options has revealed no possible causes.
The images show the "Backup" procedure is running whilst not visible, the login screen functioning normally and the form mentioned above after clicking the Access icon.
"Option Compare Database" and "Option Explicit" are mandatory in all of my procedures, I just didn't select them in this case.
Code:
Private sArgs As String
Private nCount As Integer
Private Sub btnNo_Click()
Dim args As String
Dim nCts As Integer
nCts = nCount
args = sArgs
closer Me
If args = "species" And nCts = 0 Then
forReview = False
DoCmd.OpenForm "Main_Menu"
Else
doReview "Species"
End If
End Sub
Private Sub btnYes_Click()
closer Me
If sArgs = "Species" Then
DoCmd.OpenForm "not_in_list"
Else
DoCmd.OpenForm "Reviewing"
End If
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF1 Then
getHelp Me
KeyCode = 0
End If
End Sub
Private Sub Form_Load()
sArgs = getArgs(Nz(Me.OpenArgs), 1)
If sArgs = "Species" Then
nCount = DCount("*", "Not_In_List")
Else
nCount = DCount("*", "Herbarium_Collection", "[status] = 'R'")
End If
noShowImage
isOne (nCount)
If sArgs = "Species" And nCount = 0 Then
Call btnNo_Click
ElseIf sArgs = "Species" Then
Me.btnMsg.Caption = "New species names have been entered" & vbCrLf & "Please verify the spelling before approval."
Me.btnOpen.Caption = "There " & isAre & " " & nCount & " species name" & No_S & " to be checked." & vbCrLf & _
" Will you check " & Is_It & " now?"
nCount = 0
Else
Me.btnMsg.Caption = "Change the 'Status' to 'A' and press 'Enter' " & vbCrLf & "to complete the review of a record."
Me.btnOpen.Caption = "There " & isAre & " " & nCount & " record" & No_S & " to be reviewed." & vbCrLf & _
" Will you review " & Is_It & " now?"
End If
Me.Visible = True
End Sub
"
Last edited: