Incorrect order of rows

Dmitry Perets

Registered User.
Local time
Today, 10:36
Joined
Jul 20, 2006
Messages
21
Hello,

Here is some strange problem. My application deals with tenders. One of the things that the user can do for each tender is to fill in some table. The records he enters into this table are stored in table MyTable in the database. A special field in MyTable specifies the ID of the tender to which the record belongs. So MyTable looks like this:

***Tender ID***FirstColumn***SecondColumn***and so on

Now I have MyReport which prints out this table for specific tender. So its control source is some query like:

SELECT * FROM MyTable WHERE [Tender ID]=xxx

The problem is that the table is printed out when its rows order is mixed. For example, when the user enters:

Row 1
Row 2
Row 3

it is printed as:

Row 2
Row 3
Row 1

The strange thing is that when I execute the query itself (from MyReport control source) it shows me the rows ordered correctly...

How can I fix this problem? The only thing I can think about is adding an extra column to MyTable which to specify the row number, and then I can sort the report by this column. But is there another way to solve it?
 
Firstly, users should not enter data direct into a table. Users should always use a form and a form should have a query as a recordset not the actual table. Users should never see anything 'behind the scenes' of a database.

If a user uses a table then there's a good chance that your database will not be 'normalised' and data will be entered many times (like names)

Remember that a database is not like a spreadsheet, so you may need several linked tables to store data.

Secondly, you should always use a report for printing stuff out and then you can be in control of which order things are presented.

Col
 

Users who are viewing this thread

Back
Top Bottom