Click to See Complete Forum and Search --> : Getting user input from separate form
desquite
Jan 17th, 2000, 03:40 AM
I have a form that allows a user to select a document and click a button to fax it. I want to prompt them with another form to fill out with info such as the Phone Number, To, From, Comments, etc. Is there an easy way to call the form to get this information and when the button on that form is clicked continue the processes in my main form? I don't want my main form to continue until the inputed information is completed and validated.
Thanks!
netSurfer
Jan 17th, 2000, 03:46 AM
there are a couple ways. You could have the second form get called just before the doc is actually sent to be faxed, or you could have the other form be called and when they click on the end button then it would take care of sending the file to the fax. You could set a global OK varialbe to determine whether to go to the fax. I would probably do the first example.
EG:
sub cmdFax_click()
load frmInfo 1 'load it modulur so that it won't do anything until the form closes.
if booOK = true then
'now do the faxing code
else
msgbox "You didn't fill out everything.", vbokonly, "Fax Failed"
end if
end sub
I'm not sure of exact syntax because I'm at work and all my examples are at home.
[This message has been edited by netSurfer (edited 01-17-2000).]
HarryW
Jan 17th, 2000, 03:46 AM
You can easily select information from other forms, by putting the formname in front of the control name like this:
strtext = form1.text1.text
About waiting for one form to be finished with before the other continues - you can set a form to be modal or modeless. This means either all processses stop at the point the form was opened, or they continue running in the background. I can't remember which is which though :)
You should be able to find out in the help files though. Look for modal and modeless, or something similar. Someone else on this forum will probably tell you anyway.
Hope it helps.
Harry
desquite
Jan 17th, 2000, 04:35 AM
Thanks for the help. I knew about the form1.text1.text thing. Looks like that's going to be my best bet.
Thanks again!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.