1

I have a database with a main form, and on the main form is a subform. The subform also has a subform, which gets hidden unless a field on the first subform (the parent subform) is set to "ticket," at which time the second (child) subform appears. I got it working beautifully, except that the child subform appears blank, with no fields or labels on it. Just a background color that I set on the child subform itself.

I am using the following code in the AfterUpdate

Private Sub EventTypedd_AfterUpdate()

'Make the Ticket subform visible once EventTypedd is set to TICKET

If Me.EventTypedd.Value = "Ticket" Then
SBFCreateTicket.Visible = "True"
Else
SBFCreateTicket.Visible = "False"
End If

End Sub

Can anybody suggest possible reasons why the subform won't show the fields? The form itself shows up as it should, and the background color of the form shows up, but none of the fields or the field labels show up, and I can't figure out why. Anyone know why, or have a suggestion? Thanks!

2 Answers 2

0

I would like to ask a question or two but don't have the Stackoverflow kudos to do this. The issue maybe that you are not refreshing the final subform. So that when you go into the main form record without touching it, the final subform query returns zero records.

You then set flags on the top form and you should see results but the subform may not have re queried.

Try...

SBFCreateTicket.requery '<<< New line before your original code.
If Me.EventTypedd.Value = "Ticket" Then
    SBFCreateTicket.Visible = "True"
Else
    SBFCreateTicket.Visible = "False"
End If
0

Okay, I figured it out. Apparently, the AllowEdits on the second subform was set to NO, and I'm not sure why. As soon as I set it to YES, the form shows up and everything works perfectly. And as usual, as soon as I solve one problem, another one crops up a little farther down the workflow process, but that's a subject for another thread. Thanks to the ONE person that tried to help me out, anyway. :)

1
  • 1
    Thanks for posting your findings. Don't forget to accept an answer!
    – vgoff
    Nov 17, 2012 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.