B
bobdydd
Hi
I have a Main Form with Subform
I have a Report that opens on a query that restricts it to a single
record
On the report there are Labels whose captions I need to alter
depending what records are showing on the subform. But I am only
getting it to work on the first Label. Grateful for any help
Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 1
Then
Me.lbl_1.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 2
Then
Me.lbl_2.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 3
Then
Me.lbl_3.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 4
Then
Me.lbl_4.Caption = 9
End Sub
I have a Main Form with Subform
I have a Report that opens on a query that restricts it to a single
record
On the report there are Labels whose captions I need to alter
depending what records are showing on the subform. But I am only
getting it to work on the first Label. Grateful for any help
Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 1
Then
Me.lbl_1.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 2
Then
Me.lbl_2.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 3
Then
Me.lbl_3.Caption = 9
End If
If Forms![frmSite]![zfrmSiteProductLeft].Form![ComboProductID] = 4
Then
Me.lbl_4.Caption = 9
End Sub