ACC2000: Unbound Controls on a Subform Are Blank When You Print the Main Form (265224)
The information in this article applies to:
This article was previously published under Q265224 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you use code to set a value of an unbound control on a subform, the value is displayed in Form view and in Print Preview. However, when you print the main form, the unbound control on the subform is printed as a blank control, as though it had no value.
RESOLUTION
If the code that sets the value of the unbound control on the subform is relatively simple, you may be able to replace the code with a calculated expression. For example, you could replace rather simple code similar to the following
Private Sub Form_Current()
Dim X As Integer
X = Me!Field1 + Me!Field2 + Me!Field3
Me![Unbound Control] = (X / 100) + .5
End Sub
with a calculated expression that is written directly within the ControlSource property of the unbound control as follows:
= ((Me!Field1 + Me!Field2 + Me!Field3) / 100) + .5
If the code is more complex, however, there may not be an immediate resolution to this problem.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 6/25/2004 |
---|
Keywords: | kbbug kbnofix kbprint KB265224 |
---|
|