I think you would use a DLookup as ranman suggested. Check that both combo boxes have values, then lookup the value in TblOrdercodes table(again assume it has Size and Type fields).
If IsNull(Me.Size) thenMsgBox "Size must be entered"
Me.Size.SetFocus
End
Else
If IsNull(Me.Type) then
MsgBox "Type must be entered"
Me.Type.SetFocus
End
End IF
End IF
Me.OrderCode = DLookup("OrderCode" , "TBLOrderCodes" , "Size = '" & Me.Size & "' And "Type = '" & Me.Type & "'")
On the conditions, if my syntax is right, the quotes are like this:
SingleQuote DoubleQuote & Me.Size & DoubleQuote SingleQuote
SingleQuote DoubleQuote & Me.Type & DoubleQuote SingleQuote DoubleQuote