|
-
Mar 7th, 2007, 01:28 PM
#1
Thread Starter
Hyperactive Member
Access form missing fields at printout
I have a form in an MS Access project file (.adp) that has a subform on a tab control. On screen it looks fine, but when I send it to the printer the textboxes and checkboxes on the subform are cleared (screen doesn't change),
and one of the textboxes has a calculation built-in that gets biffed and reports "#error" because it's trying to calc from 2 of the textboxes that were cleared during printing.
I don't know if this makes any sense, but, the bottom line is apparently that a copy of the form is somehow being built for sending to the printer.
Any ideas?
Alternatively, I can capture the screen to the clipboard, but how can I send the clipboard to the printer from within VBA?
Thanks, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Mar 8th, 2007, 10:22 AM
#2
Thread Starter
Hyperactive Member
Textbox on a subform seems to be the culprit
I've tried reenacting the crime from scratch.
Totally new Access DB file
Form1 with nothing but a Textbox on it - saved
Form2 with nothing but Form1 as a subform - saved
I open the form, type some numbers into the textbox and print the form.
On the printout ... the textbox is empty!?!
Where are my numbers going?
Is this a bug in Access?
Thanks, DaveBo - hyperflabberghasted
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Mar 8th, 2007, 10:35 AM
#3
Re: Access form missing fields at printout
How are you printing the form?
-
Mar 8th, 2007, 10:45 AM
#4
Thread Starter
Hyperactive Member
Re: Access form missing fields at printout
Printing the form as:
- While the form is displayed and active
- File - Print ...
The Print Preview shows the data there fine, it just won't print.
I just added another textbox to the main form, i.e. not on the subform.
The data typed into that prints fine.
Thanks, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Mar 8th, 2007, 11:22 AM
#5
Thread Starter
Hyperactive Member
Workaround using .DefaultValue
Maybe this should be telling me something, but, a workaround I've just found is
when I load the textbox values in VBA if I simultaneously load the defaultvalue
then it prints fine.
e.g.
Text4.Value = 1234
Text4.DefaultValue = 1234
Note, CheckBoxes are doing the same thing.
Have fun, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|