Results 1 to 5 of 5

Thread: Access form missing fields at printout

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Question 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

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Question 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

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Access form missing fields at printout

    How are you printing the form?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    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
  •  



Click Here to Expand Forum to Full Width