473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

inputbox to textbox on bound form

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
1 2395
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Roberta | last post by:
Hello, When I use the following code to print a report for a certain client, it works fine: DoCmd.OpenReport "rpt_MNMTSingleCover_Summary_Recommendations", acPreview, "", "!=" But I want...
38
by: MLH | last post by:
I have 2 global constants declared in the same global module: Global Const MY_VERSION$ = "1.04" Global Const ProjectName$ = "MyProj" I have 2 global procedures designed to return the value of...
0
by: SpotsPlay | last post by:
If I bind a TextBox to a property on a "BusinessObject", the first time that TextBox is edited (each time the form/user control is opened) hitting Tab or clicking on another control on the...
6
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a...
0
by: colleen1980 | last post by:
Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the...
5
by: Ken Varn | last post by:
I have just started using VS.NET 2005 after using VS.NET 2003. One of the things that I noticed is that in ASP.NET, the DataSource property for TextBoxes and other web controls is no longer...
8
by: Andrus | last post by:
I need WinForms function which displays promp and asks single field from user, like string res = Util.InputBox( "Enter value" ); How to implement this ? Andrus.
7
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.