Report will not print how data was entered!

Jennacat

Registered User.
Local time
Today, 01:04
Joined
Mar 19, 2008
Messages
58
I am having a problem with my report. What I need the report to do is print the results in the same order as they were entered on the form. Right now it wants to put them in whatever order it wants (I do not have them grouped). I could group them and have then ascending, but that still puts it in a different order than i have to have it! Is there a way to have Access print the results in the order that I entered them? Thanks!
 
Put an autonumber on your table and sort by that field.

I disagree because autonumbering is not guaranteed to give you consecutive numbers. It CAN backfire on you. So, use a date/time stamp.
 
I don't think any of those suggestions will help me (sorry!). I need my Report to look like this:

Lethal Concentration 50%, 24 hrs 86.2
Lethal Concentration 50%, 48 hrs 75.6
Lethal Concentration 50%, 72 hrs 70.1
Lethal Concentration 50%, 96 hrs 65.3
Lethal Concentration 100%, 96 hrs 30.4
No Observable Effect Concentration, 96 hrs 10.9

This is how we have always organized our Word reports. We are trying to use the report function in Access to do this, but it just won't put it in the right order. This is how it's entered into the database, but Access changes the order! I could group on a certain interval, but these are not the only option that the user has to chose from when entering data. Any more suggestions?
 
But both of our solutions are perfectly valid solutions for what you are saying the problem is!
 
If you date/time stamp each entry then you can sort by date, ascending and it will display them in the order that they were entered on the form.
 
Add either a timestamp field to the table as Bob suggested or an autonumber as I suggested. If it is a timestamp, make sure to populate it when a record is entered.

In your report or the sql behind your report, sort on this new field.

Since you are presumably entering your data on the form in the order you want your items on the report, sorting in this manner will assure that they come up on the report in the order you entered them.

Does that help? Or is our premise wrong?
 
In the table create a field called DateTimeStamp and make it a Date/Time field formatted as General Date.

Then, in the Default put

Now()

just like that. Then, any time a record is entered, it will give you the date/time it was entered. You can use that field in a query to sort by.
 
however, did you realise that sorting a query does NOT apply to the report.

the report has its own sort parameters

so if you can sort the query somehow, based on the data in it, you can (and have to) sort the report again with these same sort parameters
 
however, did you realise that sorting a query does NOT apply to the report.

the report has its own sort parameters

so if you can sort the query somehow, based on the data in it, you can (and have to) sort the report again with these same sort parameters

Yes, and as I like to say, but sometimes forget, is to APPLY SORTING AT THE LAST POSSIBLE MOMENT. So, for Reports that is in the sorting and grouping, in forms it is in the underlying query, in queries it is in itself, and it is pretty much pointless to sort at table level.
 
ok, your suggestions would work if we were entering new data into a new database. This database has been around for a few years, with about 2,000+ entries already and i don't want to re-enter them all!! any other suggestions on how to solve this problem? Thanks!
 
Sounds like quite a dilemma. All automated solutions could be fraught with peril.

I just did a quick experiment with autonumber in Access and it added the numbers into an existing data set in the correct order when I created a new autonumber field on the table. If you decide to try this, be sure to remove all sorting and filtering from the table first and back up your data.

Right now, I cannot think of a more elegant way to do this automagically.
 
I think this is going to work! I puts it in the order it was entered. Some of the data doesn't go in numberical order (23, 24, 25, 2236, 2237, 26) on the report. But when I check on the form it is the same as the report. Is this because on some products I went back and added data after i had originally entered it? Thank you so much for your help!! This has been a real problem for me!
 
You lucked out. I'm not sure how the internals of Access works, but if you tried that in an Oracle database that had had multiple inserts/deletes, the results would not have been so happy (Oracle re-uses slots that have deleted records). Access may have a similar architecture. Had you compressed the database between data entry and creating this ID field, there's no telling what you would have gotten.

As Bob & Gemma mentioned before, this might not be the optimum solution going forward, but it should be workable, if I understand your problem correctly. You might want to validate it on more records.

Always glad to help!
 
Is there a way to have Access print the results in the order that I entered them? Thanks!

How about you create a Sequence field for all data tables where it matters, thereby allowing you to specify the order you wish.

Best,
Theresa
 
what it is

if you look at the query driving the form, then this will no doubt have some sort settings - the form complies with these

now a report HAS ITS OWN SORT SETTINGS, which can be the same as the query, but dont have to be - if you want it sorted the same, just set the sort to be the same

you've probably done that, perhaps without realising what youve done

its nothing to do with primary keys/ or autonumbers really
 

Users who are viewing this thread

Back
Top Bottom