Hi Guys,
I have attached a sample database with a couple different problems I'm working on.
I have alphanumeric sample ID's which are usually continuous but not always, so when working with a series of them I need to be able to have any of them user-defined and then default to continuous from there again. You can see I have linked the frmProjects to frmSamples using projectID, which is how may data is typically organized (projectID unique primary key in project table)
I can not change the table structure at all as I'm trying to build this all onto an existing database with loads of data. The sample numbers will be unique to the project but may not be unique to the entire database.. but dealing with duplicates is not my issue here. I just need to figure out how to incrementally increase the number portion as per user definition. I am assuming VBA but I'm really not proficient with it yet.
The second portion is that I have written some code in the before update event field that sets the next start value to be the previous end value, so that my numbers can be continuous. I also have it so that the next end value defaults to an equal increment so that I can keep tabbing and have all my depths automatically fill. It works, but it makes me a little nervous because you'll see the calculated Length field doesn't fill until I start typing elsewhere in the record, which makes me think the process could be a little smoother.
Thirdly, when you continue to tab within the subform, you will see it tabs through the master form as well. How do I make it so that for whatever subform I am working in, pressing tab will only get me to the end of the last record within in that subform and will not change the main form or go to a blank entry like if you tab all the way through the Beta03 project data?
Thank you. This is a re-hash of question I have been trying to solve for a while with some new additions. Alphanumeric.zip