have the following code.
What this code does is take value from a combo box and fill out a text box. I need to change it so that if any of the combo boxes havent got a selected value then a message box appears saying "please fill out the whole form" at the moment i get a debug error because the value is null.
Private Sub cmdGenerate_Click()
Dim tmpStr As String
tmpStr = Left$(cboPWP.BoundValue, 7) & "-"
tmpStr = tmpStr & Left$(cboFunction.BoundValue, 3) & "-"
tmpStr = tmpStr & Left$(cboDT.BoundValue, 3) & "-"
tmpStr = tmpStr & Left$(cboOriginator.BoundValue, 50)
strCode = tmpStr
txtCode.Value = tmpStr
tmpStr = vbNullString
End If
Thanks in advance.
Bookmarks