473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Printing Forms & Subforms

I have forms that are used in the office as well as in the field.
I want user's to be able to print out an exact copy of the form for
"in the field" data entry. (Yes we are still stuck in the 90's. We use
pencils in the field.) not PDA's.
Thier is "header" information on the Main Form. They use the Subform
for Data Entry. The Record on the Subform is created at the time of
the job via a Command Button on the main form.

Ive run into many problems with this.

1st the subform is based on a table.
(I would set the Data entry property to true but Access will not print
data entry forms).
The command from the main form opens the form with allow additions set
to true.
But the subform shows all the records, & Ive been unable to filter out
all the other records.
Ive tried a series of code using [CurrentRecord] but I cant get
anything to work.

Therefore, when I try to print the main & subform, all the subform
records print.
I want only the newly created record in the subform to print along
with the main form.

Private Sub Print_Field_Form_Click()
DoCmd.Printout acSelection
End Sub

What code can I use to filter out all subform records except for the
newly created one?
If I can get that to work, printing via (acSelection) will be
fine.
Or what code can I use to Print the Current Main Form record, & the
Current Subform record respectively.

Apr 5 '07 #1
1 6913
Private Sub Create_Job_Click()
Me.Field_Form_Sub_New.Visible = True
Me.Field_Form_Sub_New.Form.AllowAdditions = True
Me.Field_Form_Sub_New.SetFocus
DoCmd.GoToRecord , , acNewRec

DoCmd.ApplyFilter , Me.Form.CurrentRecord

The previous code in the Command Button's code provides the new record
& provides the filter on the Subform records, although it doesnt
actually filter out the other records.
Apr 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
6
by: John | last post by:
Hi, I have simple database based on 3 tables. Relationship is 'one to many' between table 1 and 2, also between 2 and 3 table'one to many'. I have made form where I enter data in all 3 tables....
1
by: Liam Kitson | last post by:
I have a main form which contains one subforms. All of the data is from the same record. The main form contains the personals details and the subform contains their order details. I would like to...
1
by: slothboy | last post by:
Hey guys, I'm having a little trouble printing subforms. I've attached the snippet of code that prints my form which contains various subforms. It prints bounded controls on the subform just...
1
by: tremor | last post by:
I'd like to print a form based on the filters currently applied to it (these are again based on selections in combo-boxes). The form has multiple subforms, and as I try to print it, it prints all...
8
by: Zlatko Matić | last post by:
Hello. How can I synchronize subforms content with current record in master form, if both form and subform are based on DAO code ? I assigned DAO recordset to forms by using QueryDef, on Load...
2
by: JonC | last post by:
I have a database where the user selects recordsets via a form with 2 levels of nested subforms. The recordsets are filtered using a series of linked combo boxes and I would like to be able to...
1
by: tmh86 | last post by:
I am currently building a database within Access 2007. I have a form that is populated via vba coding and thereform is not stored in a specific table. I have created a button that essentially runs...
0
by: BillE | last post by:
I'm wondering how others have addressed UI requirements for Access-style continuous forms and sub-forms in a windows forms application (besides third-party products). Thanks Bill
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.