Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing all records entered in session

Status
Not open for further replies.
Oct 23, 2002
110
0
0
US
I have an access form that is used for entry. The users choose an item from a dropdown, fill in a series of fields, and then the data they added and the item they choose are entered into another table as a new record, and the form continues to new blank record. They can enter as many datasets as they want, after they are done entering, I would like to print a report of what they entered. The data is already loaded into the form... How do I accomplish this?
 
What exactly defines the set of printable records?
From the time the database was open?
When you close out the form?
Ones a particular user entered?

If this is time driven then you may need to add a field to time stamp the records.
 
The set of printable records will be the records the user entered while the form was open. The user opens the form, enters all thier records, prints them, and then closes the form. If they need to go back and enter more, that would be a different set of records.
 
There are probably a couple ways of doing this. In my example I have an autonumber ID field. I would build a public variable in a standard module:
public beginID as long
Then I would build a function that returns this variable

public getBeginID() as long
getBeginID = beginID
end function

In the forms on open event I would set the value of beginID to the value of the last record of the table. I would probably just use a dmax function

beginID = DMax("ID", "tblYourTable")

Then the query that the report is based on can use the function getBegin ID in a criteria.
...where ID > "& getBeginID
 
I need a little more help with this. What if I have multiple people entering into the database at the same time. I only want to print the data that the current user entered in that session - As for the standard module I am unsure of the syntax as well as how to actually issue the print command...
 
Does the underlaying table(s) hold the user/timestamp of creation ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The database currently does not hold the user\timestamp of creation, but this could be easily added.
 
So, where is the problem if you know the user's name and the timestamp of the session's start ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top