subform detail vanishes with sub-form

GregoryWest

Registered User.
Local time
Today, 17:15
Joined
Apr 13, 2014
Messages
161
I have a sub-form/form created. When I open it as a form I get to see all my fields (with data missing)

ls4t7BgAAAABJRU5ErkJggg==



When this form is opened as a sub-form all the fields are missing
gyHv0CNFzqwAAAABJRU5ErkJggg==

The other odd thing is the query for the sub-form as 2 records in it, but these records no longer show up in either form. Has this ever happened to anyone else? Is it some control I might have switched in error?


And most importantly, how can I fix this?
 
This can happen when the form doesn't have any records and doesn't allow new records. Given what you've described, I'd check the master/child link properties of the subform control.
 
The missing data could be a filter issue. The blank form is very odd. I have a Menu -> Form ->sub-form. If I directly open the 'Form' all its data shows up, but none of the fields in the sub-form. If I open the Menu and use it to open the Form than there are no data fields in the form! This is only true for the one form I am working on, everything else plays nicely with me.


Anyone seen anything like this at all?
 
Other than what I already mentioned, no. Did you check the master/child links? Can you attach the db here?
 
Hi Gregory. Yes, we have seen this sort of behavior before. And as Paul said, it could be caused by certain form settings. For example, if the form is filtered, as you were thinking it could be the case, and the form settings does not allow additions, then you won't see any fields/controls if the filter results in an empty recordset. The same condition applies if you use the form as a subform and there's not matching record in the subform for the currently selected parent record (and the form does not allow new records to be created).
 
Going over everything it could very well be a table linking issue. Where exactly is the linking information stored is it in the calling Form, or the Sub-Form? I am looking around for it, and it is evading me....
 
Hi. It's on the main form. While in design view, select the subform and look for the Linked Master and Child Fields.
 
Found it!!! OK, can see a couple issues I will have to work around. One confusing thing left tho. The Form when opened on its own, buy clicking on it in the Objects list still comes up with no data, yet when I look at the query that it is supplying the data there are three records. Also I can add data to the query, but the data vanishes off the Form as I enter it, yet it is stored in the table properly.


I am guessing there is a filter or something somewhere that is screwing me up.
 
Would it be of any use if I uploaded the ACCDB I am working on. No big deal, as there is no confidential data in this section.
 
Actually, uploading the db would make it faster to get to the bottom of the problem.
 
Hi. If you're talking about the sub-permit-contact form, it's Data Entry property is set to Yes. Try setting it to No. Let us know if that's not what you wanted.
 
Yes that form, and its parent is Roll-Permits


OK that seems to have worked nicely!!!! Sigh, something so simple has been driving me nuts for two days.
 
Hi. Glad to hear you got it sorted out. What did I tell you about posting a demo? It helps a lot to help you. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom