By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,985 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,985 IT Pros & Developers. It's quick & easy.

Print Active Access Window Using VB

P: n/a
I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying to
filter the records is proving to be a nightmare. I'm sure there must be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's left

of my hair.

Jan 19 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.

Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
>I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying to
filter the records is proving to be a nightmare. I'm sure there must
be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left

of my hair.

Jan 19 '07 #2

P: n/a
Thanks for the reply but I've already been down that avenue. The answer
seems to be some sort of VB so thats why I thought I'd try this group.
RobinS wrote:
You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.

Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying to
filter the records is proving to be a nightmare. I'm sure there must
be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left

of my hair.
Jan 22 '07 #3

P: n/a
What version of Access are you using?

Robin S.
-------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
Thanks for the reply but I've already been down that avenue. The
answer
seems to be some sort of VB so thats why I thought I'd try this group.
RobinS wrote:
>You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.

Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegr oups.com...
>I am developing an Access database and need to be able to print a
form
with various selections made as it appears on screen. The standard
way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying
to
filter the records is proving to be a nightmare. I'm sure there
must
be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really
want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left

of my hair.

Jan 23 '07 #4

P: n/a
Access 2003

RobinS wrote:
What version of Access are you using?

Robin S.
-------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
Thanks for the reply but I've already been down that avenue. The
answer
seems to be some sort of VB so thats why I thought I'd try this group.
RobinS wrote:
You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.

Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
I am developing an Access database and need to be able to print a
form
with various selections made as it appears on screen. The standard
way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying
to
filter the records is proving to be a nightmare. I'm sure there
must
be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really
want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left

of my hair.
Jan 23 '07 #5

P: n/a
Thanks for the reply but I've already been down that avenue. The answer
seems to be some sort of VB so thats why I thought I'd try this group.
You might be right that the answer lies in VB, but I think you are
confused on "which" vb is needed. Access uses Visual Basic for
Applications (VBA), this is a scaled down version of what we refer to
as classic vb. The newgroup you are in is for VB.Net, the current, most
advanced version of visual basic. VB.Net has special syntax that is not
present in either classic vb or vba, and therefore will not work in
your Access project (not to mention it requires the .Net framework to
even run). If you want some code that will run inside of your Access
database, you need to post/search the Access newsgroup, it's google
groups url is
http://groups.google.com/group/comp....?lnk=srg&hl=en
If you are hellbent on using Vb.Net then you will have to probably have
to rewrite the form you want to print using in the new (.Net) language.
Microsoft has a free editor available for this - just search
microsoft.com for "Visual Basic 2005 Express Edition" Once you have
that you'll need to program in the built in functionality of the Access
forms, like retrieving records from the database and then allowing the
user to move between the records. I could keep going, but I think
you're getting the point that this will be a massive project,
especially since you don't know any/much visual basic. I would say this
will be about 25 times as hard as using the subforms and subreports you
mentioned in your original post.

Assuming that VBA still supports the classic VB print methods, you
might even browse that newsgroup (
http://groups.google.com/group/comp....c/topics?hl=en
) for some code that handles printing, but again printing in classic vb
was no walk in the park.

Overall, you're best bet is to just use the reports. Sure subreports
can get confusing, but they're nothing like trying to learn to
program...

Thanks,
Seth Rowe
JonC wrote:
Thanks for the reply but I've already been down that avenue. The answer
seems to be some sort of VB so thats why I thought I'd try this group.
RobinS wrote:
You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.

Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
>I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying to
filter the records is proving to be a nightmare. I'm sure there must
be
>
some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left
>
of my hair.
>
Jan 23 '07 #6

P: n/a
Cheers Seth - You've probably sabed me a lot of wasted time and effort
(not to mention hair). I'll concentrate my efforts on working through
filtering the subreports.
rowe_newsgroups wrote:
Thanks for the reply but I've already been down that avenue. The answer
seems to be some sort of VB so thats why I thought I'd try this group.

You might be right that the answer lies in VB, but I think you are
confused on "which" vb is needed. Access uses Visual Basic for
Applications (VBA), this is a scaled down version of what we refer to
as classic vb. The newgroup you are in is for VB.Net, the current, most
advanced version of visual basic. VB.Net has special syntax that is not
present in either classic vb or vba, and therefore will not work in
your Access project (not to mention it requires the .Net framework to
even run). If you want some code that will run inside of your Access
database, you need to post/search the Access newsgroup, it's google
groups url is
http://groups.google.com/group/comp....?lnk=srg&hl=en
If you are hellbent on using Vb.Net then you will have to probably have
to rewrite the form you want to print using in the new (.Net) language.
Microsoft has a free editor available for this - just search
microsoft.com for "Visual Basic 2005 Express Edition" Once you have
that you'll need to program in the built in functionality of the Access
forms, like retrieving records from the database and then allowing the
user to move between the records. I could keep going, but I think
you're getting the point that this will be a massive project,
especially since you don't know any/much visual basic. I would say this
will be about 25 times as hard as using the subforms and subreports you
mentioned in your original post.

Assuming that VBA still supports the classic VB print methods, you
might even browse that newsgroup (
http://groups.google.com/group/comp....c/topics?hl=en
) for some code that handles printing, but again printing in classic vb
was no walk in the park.

Overall, you're best bet is to just use the reports. Sure subreports
can get confusing, but they're nothing like trying to learn to
program...

Thanks,
Seth Rowe
JonC wrote:
Thanks for the reply but I've already been down that avenue. The answer
seems to be some sort of VB so thats why I thought I'd try this group.
RobinS wrote:
You might want to post this to an Access newsgroup.
There's a ton of them, and you're more likely to get
Access help there.
>
Robin S.
----------------------------------------
"JonC" <jo***********@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
I am developing an Access database and need to be able to print a form
with various selections made as it appears on screen. The standard way
of doing this would be to create a report based on the form but the
form is quite complex with nested subforms and page tabs and trying to
filter the records is proving to be a nightmare. I'm sure there must
be

some VB code that could do this for me but I'm a bit of a novice.
Printing the screen would be fairly straightforward but I really want
to print just the form window. If anyone could offer any advice it
would be greatly appreciated. At the moment I'm pulling out what's
left

of my hair.
Jan 23 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.