In the current literature there are two prevalent answers: during the Hasmonean dynasty (164 to 63 BCE) and at the Council of Jamnia (90 CE). Do you agree with either position or take a third alternative?
There are several correct answers to this. The original consonantal text probably assumed its current form somewhere towards 400BC. This is an estimate based mainly on the date of the Dead Sea scrolls. However, the Septuagint, a Greek translation of the Hebrew text from around 250BC, differs in places from our received text. Our received text dates from roughly 150AD and is called the Masoretic text., when Jewish scholars went through the consonantal text and added diacritical vowel sounds, which was sometimes purely based on there preferred interpretation of the text. this was the text Jerome used when he translated the bible into Latin.
"Current form" requires clarification. Apparently you are interested in "the canonical collection," but you might also ask when the individual scrolls were gathered together and received consistent editorial activity as a "single text" -- and to what extent this was preceded by sub-units being similarly edited (e.g. Pentateuch, Minor Prophets, Psalms, etc.). The technological development of the "codex" (rather than containers of scrolls) played an important role in such stabilization (possibly also with the sub-units), although this process is not well documented. The printing press technology solidified things even more, of course, but overall it's a very complicated matter!
I would disagree with the dates suggested by Mr. Tucker, above. Generally, the Torah is regarded as having been collected in more or less its final consonantal form by 400 BCE; the prophets became more or less collected as they are by perhaps 200 BCE; the writings (the last section to be assembled) become canonical by the 2nd century CE (the 100s). This is not to say that the texts themselves don't have elements that are much, more more ancient or that entire books within these collections weren't composed many centuries earlier--this is when they become canonical for the Jewish community. The Masoretes--who provided the vowel-pointing to the consonantal texts--did the majority of their work in the 7th through 10th centuries CE (the 8th century CE is most commonly identified, but it was no overnight process)! Hope this helps.
Somewhat difficult to answer when one looks at the DSS where one sees that the ordering of the 10 commandants was different than that of today, the height of Goliath was about half of what appeared in texts hundreds of yrs later, not to mention that we know that today's 150 Psalms once included a handful more, edited out by copyists. Its differences like these that explain why the ultra-orthodox here in Jerusalem avoid the Shrine of the Book where the DSS are on display.