Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Saves on a new Report 1

Status
Not open for further replies.

AndreB

Programmer
Aug 21, 2001
13
US
How can I do this: I have 1 selection in a ComboBox and a something writen in a TextBox. I need to create a Button that after pressed saves the selection in the ComboBox and the TextBox in a Report and showing the exact time and date this Button was pressed....
 
I would take the following steps.


1. Add the fields to your report.
txtDate
txtComboInfo
txtTextInfo

2. In the report's On Open Event, I would reference the fields on the form.

txtDate = Now()
txtComboInfo = Forms![FormName]![ComboBoxName]
txtTextInfo = Forms![FormName]![TextBoxName]

3. Add a button that opens the Report in question in either preview or print mode.

'PREVIEW MODE
DoCmd.OpenReport "ReportName", acViewPreview

'PRINT MODE
DoCmd.OpenReport "ReportName", acViewNormal

Good luck ljprodev@yahoo.com
ProDev, MS Access Applications B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top