A family of Microsoft relational database management systems designed for ease of use.
Something is causing your form to requery/refresh obviously, and you'll have to discover what that can be. Check the Form Timer event to insure nothing is happening there.
The main form Record source is a simple query against a table.
There is code on the open event that loads the user name and date. There is no code on any other event.
Also, check the subforms themselves to insure no code is running in the Load, Open or Current events of those subforms.
There are Actually Five subforms. There is no code on any of the events. Each one depends on the Link Child Fields master field feature and three of them work properly. The main form has five dummy fields which just report what record value is current on each of the subforms. Each subsequent subform uses the next dummy field as the parent field to link to.
Can you post the Recordsource you're using for the Mainform and both Subforms?
Main Form:
SELECT tblDataDocs.*, tblDataDocs.VDDGroup FROM tblDataFormatDocs WHERE (((tblDataDocs.DocID)=[forms]![frmMain]![SelectedDocID]));
SubForm 4
qryWPPartIdents4
This query works properly and the form loads as expected.
It basically sys give me two values from the data table based on two attributes.
The SQL is:
SELECT tblTelemetryData.TelemetryValue AS Ident, tblTelemetryData_1.TelemetryValue AS PartName, tblTelemetryData.VDDGroup, tblTelemetryData.TelemetryAttribute, tblTelemetryData_1.TelemetryAttribute, tblTelemetryData.TelemetryDataID
FROM tblTelemetryData LEFT JOIN tblTelemetryData AS tblTelemetryData_1 ON tblTelemetryData.TelemetryID = tblTelemetryData_1.TelemetryID
WHERE (((tblTelemetryData_1.TelemetryValue)=[forms]![frmWPBuilder]![txtPartName]) AND ((tblTelemetryData.VDDGroup)=[forms]![frmWPBuilder]![txtVDDGroup]) AND ((tblTelemetryData.TelemetryAttribute)="Ident") AND ((tblTelemetryData_1.TelemetryAttribute)="PartID"));
Subform5
qryWPOutput2
This query works properly when called manually.
When called by the form, the form loads and then goes blank.
It will then reload properly if I execute the command button with the command;
Forms!frmWPbuilder.frmWPOutput.Form.Requery
It will also reload if I select any record on subform3, other than the first record.
Actually, both form 4 and 5 load momentarily, then both go blank.
Then form four reloads but form 5 does not.
This query selects part limits and part attributes based on the part identification and Mode or test period.
Where the part name and test mode is selected in the prior subforms (Subform 3 and 4)
The SQL is
SELECT DISTINCT qryWPPartIdents.Ident, qryWPPartIdents.PartName, tblDataAttributes.AttributeTypeName, tblDataLimits.LimitCondition, tblDataLimits.LimitOperator, tblDataLimits.LowerLimitValue, tblDataLimits.[Nominal Value], tblDataLimits.UpperLimitValue, tblDataLimits.LimitUnits
FROM (qryWPPartIdents LEFT JOIN tblDataModes ON qryWPPartIdents.TelemetryDataID = tblDataModes.IdentId) LEFT JOIN (tblDataLimits LEFT JOIN tblDataAttributes ON tblDataLimits.LimitDataID = tblDataAttributes.LimitDataID) ON tblDataModes.ModeDataID = tblDataLimits.ModeDataId;
You might also check the Recordsource of your Subforms when this issue occurs. You can do that by typing this in the Immediate window, while in the Code page of your main form:
?Me.NameOfYourSubformControl.Form.Recordsource
Where "NameOfYourSubformControl" is the name of the Subform Control on the main form. This may or may not be the same name as the form you're using as a Subform, so be sure you use the right name.
The name is the same for the sub form and the control name used on the main form. But when I run this it returns the message "Variable not yet created in this context."