stevenblanc
Registered User.
- Local time
- Today, 09:16
- Joined
- Jun 27, 2011
- Messages
- 103
Hi folks,
So I solved an earlier problem loading a specific record and now found myself with a new issue. While my code opens the correct form on the correct record I find the form opens without properly drawing boxes, lines, and the record navigation pane.
If I move drag the form off the screen and back on, the portion of the form moved off the screen comes back properly drawn. The form source is a query which is recreated just before the form is opened.
I already tried adding after the requery to no avail:
The code:
Any ideas?
So I solved an earlier problem loading a specific record and now found myself with a new issue. While my code opens the correct form on the correct record I find the form opens without properly drawing boxes, lines, and the record navigation pane.
If I move drag the form off the screen and back on, the portion of the form moved off the screen comes back properly drawn. The form source is a query which is recreated just before the form is opened.
I already tried adding after the requery to no avail:
Code:
DoCmd.RepaintObject acForm "frmMachines"
The code:
Code:
Private Sub lstMachines_DblClick(Cancel As Integer)
If ObjectExists("Query", "qryCustomerMachines") Then
DoCmd.DeleteObject acQuery, "qryCustomerMachines"
End If
CurrentDb.CreateQueryDef "qryCustomerMachines", "SELECT * FROM tblMachines WHERE CUST_ID = Forms!frmCustomerRecord.CUST_ID"
DoCmd.OpenForm "frmMachines", acNormal
DoCmd.Requery
With Forms!frmMachines.Recordset
.FindFirst "MACH_ID = " & lstMachines.Column(0)
If .NoMatch Then MsgBox "The selected machine does not exist in the system."
End With
End Sub
Any ideas?