Dear All,
I have inherited a DB (simple Registration & Tracking) and I was ask to see
and update what ever necessary..
So, first thing I noticed is the code below behind the mainform (frmMain)..
The flow is, open the database, splash form displayed, after closing, pop
dialog message on the screen, if there is pending to be follow up, user
will notified by a popup form and there is a button Yes/No whether the user
will see them now or no. If the user click YES dialog form closes and open
the status form displaying the pending record in a continuous form, after
closing the status form, mainform will then be maximized (this code part is
working well), however if the user click NO, it should maximize/restore the
mainform being minimize from the Yes answer..
That is my first problem, how will I maximize/restore the minimized mainform
(on the ELSE part of the code).. currently, user just click the minimized
mainform and select "RESTORE", I don't want this, it should be
maximize/restore from the ELSE code if the user click NO.
Can someone please examine the below code and help me fix the missing code..
Thank you in advance,
Zjubias
-----------------------------
Private Sub Form_Load()
Dim intStore As Integer
intStore = DCount("[DocID]", "[qryPolicyStatus]", "[Status] = ""Pending""
AND [Complete] =0")
'="Pending") AND ((tblPolicy.Complete)=0));
'If count of Pending CAF is zero display switchboard
'Else display message box detailing amount of CAF
'and give the user the option as to whether to view these or not.
If intStore = 0 Then
Exit Sub
Else
If MsgBox("You have " & intStore & " Pending CAF" & _
vbCrLf & vbCrLf & "Would you like to see these now?", _
vbYesNo + vbInformation, "Reminder!!!...") = vbYes Then
DoCmd.Minimize
DoCmd.OpenForm "frmPolicyStatus", acNormal
Else
Docmd.Restore '(It should restore the minimize frmMain)
Exit Sub
End If
End If
End Sub
Think cid:image002.jpg@01C8BC00.2CEFE400Green before printing this email.
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar