Hello, I have searched all over and tried Many many things but cant seem to get a solution.
I have a form with a combobox (from a table, the field name is Agency). The combobox options are: TMS, HRD, and TYM.
I also have a textbox (from a table, the field name is Case_Code) *THIS IS ALSO A PRIMARY KEY*
When a user selects a Agency from the combobox (lets say 'HRD'), i need the text box to automatically populate with 'HRD-2013-001'. If on the next record, they chose 'TMS' the combobox would say 'TMS-2013-002' and so forth, will the last part of the srting always increasing by 1.
I have tried editing the contol source of the textbox but i end up getting a "Index or Primary Key cannot be Null" Error
Note: This is a simple way of putting it, eventually i will need to be able to start over with the numbers based on the Agency selected. Example: if the user chooses 'TYM', the textbox would say "TYM-2013-001', they save that record and the next time they choose 'HRD' the text box would say 'HRD-2013-001', if they chose 'TYM' for the next record it would be '....002, 003, 004' and so forth. Same for anyother Agancy selected.
If you can help with this example that would be great! Otherwise a simple solution to the first example will get me a long way! Thanks in advance!!