Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression That has no Value 1

Status
Not open for further replies.

realstandman

IS-IT--Management
Oct 29, 2003
87
US
I am trying to an onclick event that would give the message below if there are no records. The error message is Runtime 2427 You entered an expression that has no value. Which is true and thats what I'm trying to do with the message box so they know to generate a Submission prior to editing one. Any help would be greatly appreciated. This project is in Access 2k.

If IsNull(Me.sbfSubmissions.Form.SubID) Then
MsgBox ("You must first generate a new submission!!!")
GoTo exit_Command31
Else
DoCmd.OpenForm "frmRein_SubmissionEDIT", acNormal, , "subid=" & Me.sbfSubmissions.Form.SubID, acFormEdit, acWindowNormal
End If
exit_Command31:


Don't think and the solution will come.
 
I found a work around that worked out. Here is the code.

On Error GoTo exit_Command31
If Me.sbfSubmissions.Form.SubID = "" Then
MsgBox "test"
Else
DoCmd.OpenForm "frmRein_SubmissionEDIT", acNormal, , "subid=" & Me.sbfSubmissions.Form.SubID, acFormEdit, acWindowNormal
End If
exit_Command31:
MsgBox ("You must first generate a new submission!!!")


Don't think and the solution will come.
 
and what about this ?
If Trim(Me.sbfSubmissions.Form.SubID & "") = "" Then
MsgBox ("You must first generate a new submission!!!")
Else
DoCmd.OpenForm "frmRein_SubmissionEDIT", acNormal, , "subid=" & Me.sbfSubmissions.Form.SubID, acFormEdit, acWindowNormal
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top