Pop Up Text box

WackyWaterGuy

Registered User.
Local time
Today, 07:16
Joined
May 29, 2003
Messages
25
Hello everyone. Wow, there seems to be some really smart people in here. Hopefully one (or more!) of you can help me out. I have a form, with a subform in it. In the subform are a series of combo boxes where a user can select various options (this subfrom is in datasheet form). The last column in the subform datasheet is a "Comments" column. What I would like to happen, is when the user clicks on this text box, a window will pop up with a larger text box, so that the user can write in a couple of sentences, and be able to see all of it. When they are done, they could click a close button or something, and that data would be "copied" back to, or "moved" into the original cell in the subform datasheet ( the one the clicked in the first place to start the event.) I am unsure how to do this though. Do I create a new form with just textbox, and have it open this form when they click on the "Comments" field...? If so, how do I get the data back to that cell when I am done??

Please Help...I am really new to Access, and the Help section isnt being much help...nor is the 1500 page book on Access I have been referring to.

Thanks in Advance to anyone that even takes the time to read this :)

WWG
 
You can create a pop-up form that displays when the user tabs or otherwise enters into that last comment text box.

Open the form using the DoCmd.OpenForm VBA command and be sure to specify the acDialog option for the WindowMode parameter.

When you create the pop-up form, specify Yes to the Popup and Modal properties. That way, users will have to close the pop-up box before they can return to the main form. Place a large text box on it and a Close button of some sort. In the Click event of that Close button have code that copies the text that the user entered back into the text box on the subform, then have code that closes the pop-up form. It will look something like this:
Forms!YourMainFormName!yourSubFormName.Form.txtComment=Me.txtComment
DoCmd.Close acForm,Me.Name
 
Last edited:
You can use the zoom box to expand the data entry area for a text box. I prefer to use the double-click event but the click event would also work. So in the properties dialog for the control, choose either the double-click or click event and bring up the builder. Choose the third option which is to create code. Then insert the following line.

DoCmd.RunCommand acCmdZoomBox
 
Zooming is a much better idea. Very little code involved.

WWG, you realize this will happen whenever you enter the text box, whether the user wants it to or not.
 
dcx693, the zoom ONLY happens if he double-clicks in the field. That's why you would choose that event rather than the GotFocus event for example.
 
A BIG thanks to both of you!! Great suggestions, and now everything is working just the way it should!

I really appreciate it!

Thanks Again

WWG
 

Users who are viewing this thread

Back
Top Bottom