P
pattlee
Problem: What is the best way to save the user input in an unbound text box?
Need to save it to a table and am not familiar woth VBA. Thanks in advance.
Need to save it to a table and am not familiar woth VBA. Thanks in advance.
Problem: What is the best way to save the user input in an unbound text box?
Need to save it to a table and am not familiar woth VBA. Thanks in advance.
I want to save the data in the unbound control when I close the form and
before the data is sent to a report. I believe the onclose event is wher I
will place the code... Thanks for your rapid response have been tryingto
find examples for this for one solid week. Your answer is crystal clear.
Thanks so much. Will let you know how it works. Regards, Patricia
Hi Dave , here is the code as you suggested but it fails at the line
CurrentDb.Execute
'Command Button to submit all user selections to a report.
Private Sub CboSubmit_Click()
'=====================================================
'Code from Dave Hargis, Mocrosoft Access MVP inserted to
'Save the input number to the table Temp in the field NewNumber.
'=====================================================
Dim strSQL As String
strSQL = "INSERT INTO Temp [NewNumber] SELECT """ & Me.txtNewNumber & """
as Expr1;"
CurrentDb.Execute strSQL, dbFailOnError
'=====================================================
the user input is shown but the last line of the code is in yellow....
please advise. Patricia
Klatuu said:When you want it to happen will determine where you put the code. The name
are made up as example purposes.Dim strSQL As String
& """ As Expr1;"
Currentdb.Execute strSQL, dbFailOnError"pattlee" wrote:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.