MainForm's OnCurrent Event

Lamb2087

Registered User.
Local time
Today, 21:36
Joined
Feb 7, 2003
Messages
103
I have the code to make a subform disappear, but yet it does not when the text boxes in the subform are empty as you scroll through the records. Any one have any suggestions?
 
OnCurrent Event Code

Private Sub Form_Current()
With Me![RoomInfo].Form
.Visible = (.RecordsetClone.RecordCount > 0)
End With
End Sub

RoomInfo is the name of the subform
 
Private Sub Form_Current()
With Me![RoomInfo].Form
.Visible = IsNumeric(Forms!MainForm!SubformName!SomeControl)
End With
End Sub
 
Form Names

- main form name: XXXXX
- form name XRoomInfo which is the subform
- In design mode in the main form I click the subform, in the upperleft the name RoomInfo is dispalyed in the drop down.

So based on this, how would I change the code you just sent. Since I tried it and it did not work. Maybe I put in the wrong names.
 

Users who are viewing this thread

Back
Top Bottom