Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing to a hidden form

Posted on 2001-06-21
16
Medium Priority
?
204 Views
Last Modified: 2010-05-02
Hi, I currently have 3 forms. A login form, a main menu, and a form that links off from the main menu. When you login, the login form unloads and then displays the main menu. This is the same for the third form. In the third form, I have three text box's, and a submit button. When the submit button is hit, I would like it to print the three variables to some sort of text box, but to keep that text box hidded. I then want it to give the user the option (some sort os msgbox) of returning to the third form to append futher info to the hidden textbox. If the user chooses not to, i would then want the third form to hide all field and labels, and to display the hidden text box. Thanks.
0
Comment
Question by:choccarlm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
16 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6213626
how far are you yourself with this?

for each c in controls
   c.visible = false
next
hiddentextboxname.visible = true
0
 

Author Comment

by:choccarlm
ID: 6213641
Thanks, that hides and displays what I want perfectly. But I still need it to pass on information onto the hidded textbox from the three fields. How do I do That?

0
 

Author Comment

by:choccarlm
ID: 6213646
I will need it to write to the hidden box first. Then propmt them if they would like to append to this. If yes, then the textbox will remain hidden, until they no longer wish to append to it.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:CJ_S
ID: 6213653
writing to the box is done through

hiddentextboxname.text = "newtext"

What kind of fields are the 3 fields? Plain textfields?

hiddentextboxname.text = text1.text & text2.text & text3.text




0
 

Author Comment

by:choccarlm
ID: 6213656
all 3 field will be on seperate lines. They are all plain text, and will all have set text before them.
0
 

Author Comment

by:choccarlm
ID: 6213685
all 3 field will be on seperate lines. They are all plain text, and will all have set text before them.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6213715
hiddentextboxname.text = text1.text & vbcrlf & text2.text & vbcrlf & text3.text

??

can you be more clear in what you want?
0
 

Author Comment

by:choccarlm
ID: 6213753
I want it to append data to a hidden textbox, until the user wishes to stop appending. In this instance, it will display all data that has been entered into the hidden file. Once the "submit" button has been hit, it will first append to the hidden form. It will then ask the user (msgbox,..,vbYesNo,) if they would like to enter any more data (Using the 3 fields). If the answer is yes, it will display the form, and append to the first set of data. It will then prompt the user again and again, until they choose "no". Once they choose no, it will unhide the text box, and display all text within it.

Hope this makes sense. I'm knew to VB and as you can see, im having trouble.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6213788
hiddentextboxname.text = hiddentextboxname.text & vbCrLf & text1.text & vbcrlf & text2.text & vbcrlf & text3.text

that will append it
0
 

Author Comment

by:choccarlm
ID: 6213872
I know how to get it to propmt if they wish to append, but how do I know if they hit "yes" or "no" in the msgbox?
0
 

Author Comment

by:choccarlm
ID: 6213998
I have used (msgbox "....", vbYesNo, "......", ). This displays the message box, with the question and 2 buttons (Yes / No), but im not sure how to read the users answers.
Any ideas?

I will award the points on this one.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6214081
If (MsgBox("Check", vbYesNo) = vbOK) Then
   
Else
   
end if

Regards,
CJ
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 300 total points
ID: 6214083
Can I post it as my answer? :-/
0
 

Author Comment

by:choccarlm
ID: 6214095
Thanks a lot. That was really helpful. One more small question. How do you select all text within a textbox, and copy it to the clipboard?

Thanks
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6214130
I'm sorry, but that hasn't been mentioned in the question you wrote above. If you would';ve given me an A I probably would';ve given you the code...but not for a B. I'm sorry...
0
 

Author Comment

by:choccarlm
ID: 6214148
No Probs.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question