Avatar of verpit
verpitFlag for United States of America asked on

Show *(New) record at the top of the table instead of the bottom?

I'd like to show the *(New) record entry at the top of the table as opposed to the bottom.
Microsoft Access

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
Rey Obrero (Capricorn1)

sorry, not possible
mbizup

You can work around this in your user interface with forms and a little VBA:

- A main form with textboxes for the user to enter the data for the new record.
- A command button with VBA code in it's click event to add the record to your table.
- A subform in datasheet view to show the other records in your table.

Are you interested in an approach like this?
ASKER
verpit

very much....  Thanks mbizup,

perhaps you could attach an example?  

OR

what might you do with the database referenced here http://filedb.experts-exchange.com/incoming/2008/05_w21/27125/Tasks.mdb 

Thanks for offering to help with this.  It seems like such an obvious thing to leave out.  I can't believe you can't enter a new record from wherever you want.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
mbizup

verpit,

Your frmDailyTasks is actually very much like what I had in mind, although I would have used unbound fields (personal preference).

If you click on the * button at the bottom of the subform, a new record appears in the top portion of the main form ready for data entry.  This is basically what I described in my previous post.  Do you have a specific issue with this (bearing in mind that cap's comment is ultimately correct with regards to location of new records in tables, datasheets or continuous forms)?
ASKER
verpit

I was trying to mimic the behavior of slimtimer.  It's an online program (I need offline) that manages minute-by-minute tasks.  You enter new tasks from the top (or middle in the case of slimtimer) and the oldest tasks are on the bottom with the newest tasks closest to the top.  An example screenshot of what I am referencing is attached.
slimtimer-example.png
mbizup

The closest you can come to that in Access is using a form similar to what you already have.  With a smaller number of fields, you would be able to line the controls in the main form up horizontally, directly over their corresponding columns in the datasheet subform.  The order the records could be determined by basing your form on a query that sorted them in descending order eg:
SELECT * FROM YourTable ORDER BY YourField DESC

Unfortunately, you cannot do better than that in Access.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
verpit

OK,  I'm interested in seeing what that would look like. I'm very limited in my access experience.  Can you take what I have attached and show me what you mean, or at least close enough that I get the idea?
ASKER
verpit

The link to the attachment I was refering to is here http://filedb.experts-exchange.com/incoming/2008/05_w21/27125/Tasks.mdb 

thanks again for your assistance.
ASKER
verpit

The developer of slimtimer does provide an api.  I'm not a programmer by trade so I am certain this is over my head.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
mbizup

verpit,

I will try to post a sample tonight (US East Coast)
ASKER
verpit

I appreciate it.  This will answer the question as to whether or not Access is close enough or not.  Note that I have also referenced this question in particular in an email to the API developer of slimtimer.
ASKER
verpit

this same conversation is continued here https://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23423062.html and answered by mbizup and anyone else who would like to chime in.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
mbizup

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
verpit

Wow!  Thanks for both the resources and the sample.  That will help a bunch.  I think that form is workable for me.  I'll work on closing some old questions.  I've been pretty good about it lately.  Here is the error I got attached referencing the code CurrentDb.Execute strSQL, dbFailOnError on clicking debug
run-time-error.png
ASKER
verpit

PS. note that I am running this tonight on a Vista machine where I am not an admin.  Would it be possible to sort this based on a single time/date control value as opposed to just date?  This is because I will hide the old day's from this form once I get it the way I want it.
mbizup

Did you get this error by running the sample I gave you on your machine (it works fine on my end), or by incorporating the code into your own database?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER
verpit

You are correct, I was wrong.  If I enter all the data it works like a charm.  Nobody has been able to answer that question and it deserves 1000 points at least.  THANK YOU THANK YOU THANK YOU...  You Rock!
ASKER
verpit

I have a follow-up question that I would really like to use your sample with.  Since I have already asked it, I won't clutter that question referencing this one.  It is regarding making the date/time field automatically populate base on entry into the task field.  I'd also like to have the enter key add the record by default if that is possible.  Again, I'll wait for the response in the other thread here https://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Architecture-Design/Q_23421485.html before posting new questions.  You clearly answered this one.  
mbizup

Good deal.  I'm glad that helped.

>  Since I have already asked it, I won't clutter that question referencing this one.
You can post the sample in the other question so that it is available to the Experts helping you over there.

I won't have a chance to look into this until later tonight, but I'll jump in if help is still needed at that point.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.