Hmmm, that could get pretty complex. It might be easiest to use a custom function. You could call the function form a query. Paste the following into a new Standard Module.
Code:
Public Function FirstThreeGroups(ByRef ValueOfField As String) As String
Dim strRevised As String
Dim varElements As Variant
Dim i As Integer
strRevised = ""
varElements = Split(ValueOfField, "-")
For i = 0 To 2
strRevised = strRevised & varElements(i)
If i < 2 Then
strRevised = strRevised & "-"
End If
FirstThreeGroups = strRevised
Next I
End Function
Then you could call the function from within a query by creating an alias. You can create an alias by naming your alias and typing the name in a new field within the grid of the Query Designer. Something like MyAlias and follow with a colon MyAlias:
Here is an example of an alias named FirstThree that calls the function above. You would need to change the table name and field name to match your table name and field name.
Code:
FirstThree: FirstThreeGroups([TableName].[FieldName])