I'm trying to make a dialog box pop up and ask the User for their name when they open a particular form. I then want to set the default value of a text box called "EnteredBy" to their name. However the only thing that ever appears in the text box is "#Name?" I don't know what I'm doing wrong. Can somebody please help with the code that I'm missing?
So far, in my declarations I have:
Then on Form Open I run the following command:
The inputBox and MsgBox funstions work properly and store the string, but for some reason I can't set the default value property control. Any help is appreciated.
Ed
So far, in my declarations I have:
Code:
Dim varUserName as String
Code:
varUserName = inputBox(Please enter your name) 'Prompts user for their name and stores it in the variable varUserName. MsgBox (varUserName) ' Displays the value of varUserName Me![EnteredBy].defaultvalue = varUserName
Ed
Comment