|
-
Mar 4th, 2002, 02:10 AM
#1
Thread Starter
Lively Member
Inputbox problem
Is there a way to copy the contents of a textbox into a Inputbox?
-
Mar 4th, 2002, 02:14 AM
#2
Try:
VB Code:
Private Sub Form_Load()
Dim sTemp As String
sTemp = InputBox("whatever goes here", , Text1.Text)
End Sub
________
Live Sex Webshows
Last edited by Bruce Fox; Aug 14th, 2011 at 04:54 AM.
-
Mar 4th, 2002, 02:42 AM
#3
Thread Starter
Lively Member
Thankyou for the reply Bruce, but I don't think i explained myself
properly, I want to type a name into a textbox then press a button which calls the input box. I want the name to appear in the
inputbox's typeable field.(I don't know what the real name for the field is)So that the inputbox is kind of a verification tool.(eg.I'll type "Do you want to save this name?" in the inputbox's label)
Thanks,
-
Mar 4th, 2002, 02:47 AM
#4
No worries, try this;
VB Code:
Option Explicit
Private Sub Command1_Click()
Dim sTemp As String
sTemp = InputBox("whatever goes here", , Text1.Text)
End Sub
This will place whatever u typed in the TextBox into the InputBox's input field.
This will place the contents of TextBox in the Label:
VB Code:
Option Explicit
Private Sub Command1_Click()
Dim sTemp As String
sTemp = InputBox(Text1.Text)
End Sub
________
WASHINGTON MARIJUANA DISPENSARIES
Last edited by Bruce Fox; Aug 14th, 2011 at 04:54 AM.
-
Mar 4th, 2002, 02:51 AM
#5
See above, and here is the InputBox syntax;
InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, context])
The [xxx] are Optional.
If you want the required field, prompt blank - use "".
So, for what u want to do, we are setting the [default] to the
value of a TextBox 
________
BeautyDuo
Last edited by Bruce Fox; Aug 14th, 2011 at 04:54 AM.
-
Mar 4th, 2002, 03:07 AM
#6
Thread Starter
Lively Member
Thanks again Bruce, but it doesn't seem to be working, here's the code:
trFirstName = Trim(InputBox( _
"Enter This Player's Name Into Database?:", , Text1.Text))
strPlayersAddress = Trim(InputBox( _
"Enter Player's Address:"))
strPlayersPhone = Trim(InputBox( _
"Enter Player's PhoneNumber:"))
There's no error message but it doesn't copy the contents.
What am I doing wrong?
-
Mar 4th, 2002, 03:24 AM
#7
That works fine for me?????
I have text in Text1 and the text is placed in the first InputBox's input field.
Then, the other 2 InputBoxes show up!
VB Code:
Dim trFirstName As String
Dim strPlayersAddress As String
Dim strPlayersPhone As String
trFirstName = Trim(InputBox("Enter This Player's Name Into Database?:", , Text1.Text))
strPlayersAddress = Trim(InputBox("Enter Player's Address:"))
strPlayersPhone = Trim(InputBox("Enter Player's PhoneNumber:"))
________
TreneSexy cam
Last edited by Bruce Fox; Aug 14th, 2011 at 04:55 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|