database keeps getting out of order.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database that tracks employees hourly duties during their
shift. I can order the database using a querie but howdo I make it so that
the database is always in order all of the time?
 
There are no physical order as such in a database; you must use Order By
clause(s) on whatever field(s) you want your result to be sorted on.

S. L.
 
Thanks Sylvain. Ok, well is there a way to add a primary key to the database
that will give ID numbers to each report after I organize the database in a
querie and then save the whole database under a different name? When I
created this database, I omitted the primary key.
 
shhsecurity said:
Thanks Sylvain. Ok, well is there a way to add a primary key to the
database that will give ID numbers to each report after I organize
the database in a querie and then save the whole database under a
different name? When I created this database, I omitted the primary
key.

Why not just base your reports on the query that sorts the data in the
order you want, or just order in in the report?
 
Where and how exactly do I put that code using Order By so that it does this
automatically?
 
shhsecurity said:
Where and how exactly do I put that code using Order By so that it
does this automatically?

I am not totally sure how you want to order your report, but if you go
to design view right click on the top left button on the form and select
"properties" to get the report properties, you will see the "order by"
feature. Just add in the field you want to sort by. Likewise you can add a
sort to a query.

Maybe I just don't understand what your ordering order is. If it is not
a simple sort, maybe you could explain.
 
Ok so opening the properties of the DAILY_REPORT form and looking in the
Order By filed yeilded this: DAILY_REPORT.[3]

[3] being the Date/Time field

Is this the correct way to use field [3] to Order By?
 
shhsecurity said:
Ok so opening the properties of the DAILY_REPORT form and looking in
the Order By filed yeilded this: DAILY_REPORT.[3]

[3] being the Date/Time field

Is this the correct way to use field [3] to Order By?

I believe that should do it. Remember that the last sort is the one you
will see. So any sort in a query etc. will be be overridden by the sort in
the report, witch is what I believe you want. The way to check for sure is
to run the report and check the results.
 
Thank you Joseph for all of your help.
Is this effecting the search function of my combo box if I am looking for a
certain record? I have the times of 2400-0800, 0800-1600, and 1600-2400
that I search for on different dates. Every time I click on a time/date
other than 2400-0800 it will not go to that record. The record switches to
the correct date but not the correct time.

Joseph Meehan said:
shhsecurity said:
Ok so opening the properties of the DAILY_REPORT form and looking in
the Order By filed yeilded this: DAILY_REPORT.[3]

[3] being the Date/Time field

Is this the correct way to use field [3] to Order By?

I believe that should do it. Remember that the last sort is the one you
will see. So any sort in a query etc. will be be overridden by the sort in
the report, witch is what I believe you want. The way to check for sure is
to run the report and check the results.
 
shhsecurity said:
Thank you Joseph for all of your help.
Is this effecting the search function of my combo box if I am looking
for a certain record? I have the times of 2400-0800, 0800-1600, and
1600-2400 that I search for on different dates. Every time I click
on a time/date other than 2400-0800 it will not go to that record.
The record switches to the correct date but not the correct time.

I am not sure. I have very seldom used combo boxes
Joseph Meehan said:
shhsecurity said:
Ok so opening the properties of the DAILY_REPORT form and looking in
the Order By filed yeilded this: DAILY_REPORT.[3]

[3] being the Date/Time field

Is this the correct way to use field [3] to Order By?

I believe that should do it. Remember that the last sort is the
one you will see. So any sort in a query etc. will be be overridden
by the sort in the report, witch is what I believe you want. The
way to check for sure is to run the report and check the results.
:

shhsecurity wrote:
Where and how exactly do I put that code using Order By so that it
does this automatically?

I am not totally sure how you want to order your report, but if
you go to design view right click on the top left button on the
form and select "properties" to get the report properties, you
will see the "order by" feature. Just add in the field you want
to sort by. Likewise you can add a sort to a query.

Maybe I just don't understand what your ordering order is. If
it is not a simple sort, maybe you could explain.


:

shhsecurity wrote:
Thanks Sylvain. Ok, well is there a way to add a primary key to
the database that will give ID numbers to each report after I
organize the database in a querie and then save the whole
database under a different name? When I created this database,
I omitted the primary key.

:

There are no physical order as such in a database; you must use
Order By clause(s) on whatever field(s) you want your result to
be sorted on.

S. L.

message
I have created a database that tracks employees hourly duties
during their shift. I can order the database using a querie
but howdo I make it so that
the database is always in order all of the time?

Why not just base your reports on the query that sorts the
data in the order you want, or just order in in the report?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top