subform in tab control (1 Viewer)

dcobau

Registered User.
Local time
Today, 22:42
Joined
Mar 1, 2004
Messages
124
g'day,

this is one of my old projects which, all of a sudden (dont'ya hate the 'all of a sudden' event?), gives me problems.

I have subforms frmDocs and frmFiles in tab control pages which are linked to the main form, frmProject, by field ProjectId.

Records in frmFiles are displayed properly as shown in attachment frmFiles.jpg.

Records in frmDocs (see attachment frmDocs.jpg) seem to be hidden.

I have been checking the setting of the subforms (and I think it's got to be the from settings that's causing the problem) and their fields but cannot find any diferences. Any ideas?

thanks

Dave
 

Attachments

  • frmDocs.JPG
    frmDocs.JPG
    30.7 KB · Views: 96
  • frmFiles.JPG
    frmFiles.JPG
    71.7 KB · Views: 85

dcobau

Registered User.
Local time
Today, 22:42
Joined
Mar 1, 2004
Messages
124
I found the cause, it's this bit of code on the OnCurrent event:

'If IsNull(Me![Related report]) Then

'OldDetailSize = Me.Detail.Height
'OldControlSize = Me![Related report].Height

'Me![Related report].Height = 0
'Me![Related report].Visible = False

'Me.Detail.Height = 0.5

'Else

'Me.Detail.Height = OldDetailSize
'Me![Related report].Height = OldControlSize
'Me![Related report].Visible = True

'End If

'If IsNull(Me![RMs and other]) Then

'OldDetailSize = Me.Detail.Height
'OldControlSize = Me![RMs and other].Height

'Me![RMs and other].Height = 0
'Me![RMs and other].Visible = False

'Me.Detail.Height = 0.5

'Else

'Me.Detail.Height = OldDetailSize
'Me![RMs and other].Height = OldControlSize
'Me![RMs and other].Visible = True

'End If

for some reason Access thinks that the fields are null, so it hide the field in form view.

Dave

PS. the obvious question now is why does Access think the fields are null......:D
 

Users who are viewing this thread

Top Bottom