View Single Post
  #5 (permalink)  
Old February 19th, 2004, 09:43 AM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by bph
 This works well. But..There's always a what if....the user decides she/he doesn't want to go into the form after all. How can allow for a graceful exit from the input box?
 In that case, skip the DO LOOP altogether and just accept any initials. Check for no input.
Code:
   Dim varInitials as Variant

   varInitials = InputBox("Please enter your initials.","User Initials")
   If IsNull(varInitials) Then
      'No initials entered.  Assume they don't want to put any.
      'Enter some code here to do something else, e.g. close the form.
   Else
      Me.txtInitials = Trim(varInitials)
      Me.txtInitials.SetFocus
   End If





Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote