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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required Fields on a Form entry

Status
Not open for further replies.

lr999

Technical User
May 16, 2011
30
0
0
US
Hello

I need to make 'script#' and "script developer' required fields on script form. I used the following code:

Private Sub Form_Close()

If IsNull(Me.Script#) Or Me!Script# = "" Then
Me!Mes.Caption = "Script# Can Not be Blank"
Me!Script#.SetFocus
valFields = False

If IsNull(Me.ScriptDeveloper) Or Me!ScriptDeveloper = "" Then
Me!Mes.Caption = "Script Developer Can Not be Blank"
Me!ScriptDeveloper.SetFocus
valFields = False
End If
End Sub
 
Is there a problen you could tell us about? What are your results? IMO, the "#" and other symbols should never be used in object names. Did you try wrap you unorthodox names in []s?
Code:
If IsNull(Me.[Script#]) Or Me![Script#] = "" Then

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top