D
Doug
Access 2000:
This is OpenEvent for my MainForm. If condition below is met,
I want to see ExpiryDatesForm and when I close ExpiryDatesForm,
then MainForm can have the Focus. At present, MainForm keeps
the focus and ExpiryDatesForm is minimized. Can anyone help?
I'm slipping a second question in here.
When I go from FormView to DesignView and back to FormView,
Access has reset my Static variable. Is this normal or did I
use the Static variable incorrectly?
TIA
Doug
Private Sub Form_Open()
Dim intPlates As Integer
Dim strWHERE As String
Static Opened As Boolean
strWHERE = "Plate_expire < #" & LastOfMonth & "#"
intPlates = DCount("Car_ID", "tblCarDetails", strWHERE)
If (intPlates > 0) _
And (Not Opened) Then
DoCmd.OpenForm "ExpiryDates"
Forms![ExpiryDates].SetFocus
Opened = True
End If
End Sub
This is OpenEvent for my MainForm. If condition below is met,
I want to see ExpiryDatesForm and when I close ExpiryDatesForm,
then MainForm can have the Focus. At present, MainForm keeps
the focus and ExpiryDatesForm is minimized. Can anyone help?
I'm slipping a second question in here.
When I go from FormView to DesignView and back to FormView,
Access has reset my Static variable. Is this normal or did I
use the Static variable incorrectly?
TIA
Doug
Private Sub Form_Open()
Dim intPlates As Integer
Dim strWHERE As String
Static Opened As Boolean
strWHERE = "Plate_expire < #" & LastOfMonth & "#"
intPlates = DCount("Car_ID", "tblCarDetails", strWHERE)
If (intPlates > 0) _
And (Not Opened) Then
DoCmd.OpenForm "ExpiryDates"
Forms![ExpiryDates].SetFocus
Opened = True
End If
End Sub