verpit
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.
sorry, not possible
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?
- 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
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.
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.
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)?
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
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
slimtimer-example.png
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.
SELECT * FROM YourTable ORDER BY YourField DESC
Unfortunately, you cannot do better than that in Access.
ASKER
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
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.
thanks again for your assistance.
ASKER
The developer of slimtimer does provide an api. I'm not a programmer by trade so I am certain this is over my head.
verpit,
I will try to post a sample tonight (US East Coast)
I will try to post a sample tonight (US East Coast)
ASKER
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
this same conversation is continued here https://www.experts-exchange.com/questions/23423062/Hide-New-record-row-in-table.html and answered by mbizup and anyone else who would like to chime in.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
run-time-error.png
ASKER
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.
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?
ASKER
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
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/questions/23421485/CreatedDateTime-field-take-on-value-based-on-time-of-entry-into-another-field.html before posting new questions. You clearly answered this one.
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.
> 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.