TextBox in a Form

C

Clare

I have a text box related to a table within a form. And
when I change the data in the textbox I want the data to
change in the table automatically without having to close
the form first. Any suggestions.
 
F

Fredg

Clare,
Data is saved to the table whenever you go to the next record, close the
form, or explicitly tell it to save by either clicking on the Record
Selector bar or through code.
If you don't wish to close the form, or go to the next record, or click on
the record selector bar, you can code the Control's After Update event:

DoCmd.RunCommand acCmdSaveRecord.

But then as soon as you go to the next record, it would have saved the data
anyway.

The above RunCommand code is useful however in the code to save the current
record before opening a report based upon that record. Is that what you
wanted to do?

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName",acViewPreview, , "[RecordID] = " & [RecordID]
 

Ask a Question

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.

Ask a Question

Top