By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

inputbox to textbox on bound form

P: n/a
dear sir can any one help me that how to get the value or any strings
type in input box to update the value of a bound form...the text box
on bound form name is policyno

or any other example that can help me in order to understand hereunder
scenerio

rgds, shahzad
Private Sub btnDuplicate_Click()
On Error GoTo Err_btnDuplicate_Click

Dim msgText As Integer
Dim txtPolicyNo As String
Dim msgInput As String
Dim msgTitle As String
Dim txtInput As String

msgInput = "Enter new Policy No."
msgTitle = "Renewal Motor Policy No"
txtPolicyNo = POLICYNO.Value

msgText = MsgBox("Do you want to renew Policy No. " & txtPolicyNo,
vbQuestion + vbYesNo, "Renewal: Motor Policy")
If msgText = 6 Then

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste
Append

txtInput = InputBox(msgInput, msgTitle, txtPolicyNo)
Else

MsgBox ("You cancel the renewal of Policy No. " & txtPolicyNo)

End If

Exit_btnDuplicate_Click:
Exit Sub

Err_btnDuplicate_Click:
MsgBox Err.DESCRIPTION
Resume Exit_btnDuplicate_Click

End Sub
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ms******@yahoo.ca (MUHAMAMD SALIM SHAHZAD) wrote in message news:<5a**************************@posting.google. com>...
dear sir can any one help me that how to get the value or any strings
type in input box to update the value of a bound form...the text box
on bound form name is policyno


Private Sub cmdDataFromInputBox_Click()
Dim strInput As String
strInput = InputBox("Enter your data", "I'll put this in THAT field!")
Me.policyno.SetFocus
Me.policyno= strInput

End Sub

the HELP file is your friend... introduce yourself to it sometime.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.