Re query and close

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The error message require data for these two fields. How do I tell the app
to re query and close if the two fields have values?


strTitle = "Change Composite Data"
strStyle = vbOKOnly + vbInformation

If IsNull(Me.Composite_ID) Or Me.Composite_ID.Value = "" Then
Me.Composite_ID.SetFocus

strMsg = "Please select a Composite_ID from the list." & (Chr(13) &
Chr(10)) & (Chr(13) & Chr(10)) & _
"Click <OK> to continue."
strResponse = MsgBox(strMsg, strStyle, strTitle)
strTitle = "Change Composite Data"
strStyle = vbOKOnly + vbInformation

End If

If IsNull(Me.Total_Return) Or Me.Total_Return.Value = "" Then
Me.Total_Return.SetFocus

strMsg = "Please enter a Total Return." & (Chr(13) & Chr(10)) &
(Chr(13) & Chr(10)) & _
"Click <OK> to continue."
strResponse = MsgBox(strMsg, strStyle, strTitle)

End If

???????
'If Me.Composite_ID.Value = True And Me.Total_Return.Value = True Then
'DoCmd.Requery
'DoCmd.Close
'End If
 
If nz(Me.Composite_ID)<>"" and nz(Me.Total_Return)<>"" then
'they both have values
else
'they don't
end if
 
Back
Top