New record in a subform is not always placed as the last record

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

Guest

Have about 370 record in my main form (tab form) which has a subform (tab
form)in which can be added multiple records. At one point (and this does not
happen for the few 230 records, when entering a new record in my subform, and
lets say I already have 3 records (3 of 3), the new record becomes 3 of 4 or
2 or 4 and not 4 of 4... What have I done wrong? Also, I would actually
prefer, if it at all possible, that the last record entered be the 1 out of
4. This is a tab subform - it would really be nice that the first (sub)record
be the latest one so the most current one is the one to be seen on the Forms
screen. Thanks for any help given.
 
Guiz,
Sounds like the sorting for the form is causing records, once they are
added, to sort themselves where they belong in the sorted recordset... which
may/may not not be the last record in the recordset.

The easiest way to to sort by "entry order" is to add a DOC field
(DateOfCreation) to your table. When you create a new record it will have
the latest Date/Time. If you sort the form query on DOC Descending, and new
record will jump to 1 of x records.

I would mention though... that it's more usual to sort records DOC
Ascending so that commands and constants like acLast and acFirst will go to
the "logically" correct record. Using your method, acLast would refer to
the very first record ever entered.
Your acFirst record should be your oldest, and your acLast record should be
your newest
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions



"Guiz and Access - No coding abilities"
 
If you are using an autonumber primary key for the table that your
query/subform is based on, you could perhaps do a sort (descending) in the
query so that the records in the subform appear in reverse order of how they
are entered.
 
Al Camp said:
Guiz,
Sounds like the sorting for the form is causing records, once they are
added, to sort themselves where they belong in the sorted recordset... which
may/may not not be the last record in the recordset.

The easiest way to to sort by "entry order" is to add a DOC field
(DateOfCreation) to your table. When you create a new record it will have
the latest Date/Time. If you sort the form query on DOC Descending, and new
record will jump to 1 of x records.

I would mention though... that it's more usual to sort records DOC
Ascending so that commands and constants like acLast and acFirst will go to
the "logically" correct record. Using your method, acLast would refer to
the very first record ever entered.
Your acFirst record should be your oldest, and your acLast record should be
your newest
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions



"Guiz and Access - No coding abilities"
 
Al Camp,

Thank you. I did not add a DOC field but your answer was helpful and got me
thinking. Each record in my subform has a "docket number" and this number
always "increases" and is unique (do not want however to set it up as a
primary key because of existing relationships, etc.). Solution used: went in
the subform and on the Docket number box and just did a Sort-->Descending so
that the record the most current/higher number is the first one we see.

If you think is a dicey fix, let me know. Thanks again.
 
Mnature,

Thank you. I do not have a primary key for this table but your answer was
helpful and got me thinking. Each record in my subform has a "docket number"
and this number always "increases" and is unique (do not want however to set
it up as a primary key because of existing relationships, etc.). Solution
used: went in the subform and on the Docket number box and just did a
Sort-->Descending so that the record the most current/higher number is the
first one we see.

If you think is a dicey fix, let me know. Thanks again.
 
No, sorting Desc is OK.
But... just remember, as you add new records at the bottom of the
subform, as soon as that new record is update, it will shoot to the top of
the subform.
Often, when "typical" multiple users (other than yourself and not often
very savvy about anything but data entry) encounter that phenomenon, they
think that the record they just entered "disappeared", and either run for
the supervisor... or... reenter the record all over. Believe me... it
happens.
Give your method a go and see how it works for you. That's all that
really counts...
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Guiz and Access - No coding abilities"
 

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