right now I have this code in my frm_labtestinput:
and I this is now the code for the combobox in the header:
The subform does not show but the form grows and shrinks based on the part numbers listed in the AfterUpdate.
Code:
Private Sub ShowStretch()
Me.InsideHeight = 9800
Me.UsbInput.Visible = True
Me.UsbInput.Height = 7920
Me.Label46.Top = 10000
Me.LabDefectFound.Top = 10000
Me.Label48.Top = 10000
Me.Label47.Top = 11000
Me.LabAtt.Top = 11000
Me.UpdateRecord.Top = 11100
End Sub
Private Sub HideShrink()
Me.InsideHeight = 3000
Me.UsbInput.Visible = False
Me.UsbInput.Height = 0
Me.Label46.Top = 1800
Me.LabDefectFound.Top = 1800
Me.Label48.Top = 1800
Me.Label47.Top = 2880
Me.LabAtt.Top = 2880
Me.UpdateRecord.Top = 3050
End Sub
and I this is now the code for the combobox in the header:
Code:
Private Sub cboGoToRecord_AfterUpdate()
On Error Resume Next
Dim rst As Object
Set rst = Me.RecordsetClone
rst.FindFirst "AuditID = " & Me.cboGoToRecord.Value
Me.Bookmark = rst.Bookmark
If Me.PartNumber = 11 Or _
Me.PartNumber = 2 Or _
Me.PartNumber = 10 Or _
Me.PartNumber = 13 Or _
Me.PartNumber = 45 Then
ShowStretch
Else
HideShrink
End If
End Sub
The subform does not show but the form grows and shrinks based on the part numbers listed in the AfterUpdate.