View Single Post
  #1 (permalink)  
Old February 18th, 2004, 05:34 PM
bph bph is offline
Friend of Wrox
Join Date: Dec 2003
Location: , , .
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default Where do i put the code?

I have some code I would like to see run after a form has opened and is viewable by the user.

It's an input box which asks a user to enter his or her initials. On open I set focus to the textbox that I would like the entry made. Then I would like the input box to come up allowing the entry.

I tried the lost focus event, but if the user goes back to the textbox, it comes at them again and that isn't good.

Here's the code I'm using. Anyway around the user taking cancel and totally avoiding this entry? It can't be null, and the user can't do a cancel. Aside from required set on textbox which I curently use.
Dim strInput As String, strMsg As String
strMsg = "Please enter your Initials."
strInput = InputBox(Prompt:=strMsg, _
Title:="Action Required", XPos:=5000, YPos:=5000)
MsgBox "Thank You, " & strInput

********Thanks, BPH
Reply With Quote