Save Textbox Value When Closing Report

P

panzerguy

I have textboxes on a report that are filled using a query (Access
2000). The report has many records, and the records on the report are
sorted by a textbox, txtTestNo. The user sorts through the records
using the navigation buttons at the bottom of the report. When the
user finds the record needed, they close the report.

Is there a way I can save the txtTestNo value for the record the user
was on when they closed the report? Let's say there are 10 records
representing Test No's 1 - 10 (the txtTestNo text box is formatted as
an integer). The user navigates to Test No 8, and they close the
report, which takes them back to a "Main Menu" form. I need to save
the Test No for that record, in this case the number 8.
 
P

pietlinden

I have textboxes on a report that are filled using a query (Access
2000). The report has many records, and the records on the report are
sorted by a textbox, txtTestNo. The user sorts through the records
using the navigation buttons at the bottom of the report. When the
user finds the record needed, they close the report.

Is there a way I can save the txtTestNo value for the record the user
was on when they closed the report? Let's say there are 10 records
representing Test No's 1 - 10 (the txtTestNo text box is formatted as
an integer). The user navigates to Test No 8, and they close the
report, which takes them back to a "Main Menu" form. I need to save
the Test No for that record, in this case the number 8.

That's odd... why do you want to store calculated values? Usually not
recommended unless there's a very good reason for it. So what's
yours? Sounds like something you could achieve with a parameterized
totals query...
 
P

panzerguy

Actually, it's not a calculated value. The value is stored in a field
in a table. When the user exits the report, he'll have the option to
edit that record he was looking at when he exited. Since there are
several records in the report, I need to know which record needs
editing. To do that, I need the Test No. from that record.
 
J

John W. Vinson

I have textboxes on a report that are filled using a query (Access
2000). The report has many records, and the records on the report are
sorted by a textbox, txtTestNo. The user sorts through the records
using the navigation buttons at the bottom of the report. When the
user finds the record needed, they close the report.

Is there a way I can save the txtTestNo value for the record the user
was on when they closed the report? Let's say there are 10 records
representing Test No's 1 - 10 (the txtTestNo text box is formatted as
an integer). The user navigates to Test No 8, and they close the
report, which takes them back to a "Main Menu" form. I need to save
the Test No for that record, in this case the number 8.

Reports don't really have any usable events, and are not designed to capture
data (even such data as the current page being viewed). It's just *possible*
that the report's Close event could expose its Page property, but I rather
doubt it - you might want to ask on the Reports newsgroup.

If the user is just browsing data in a table or query and wants to note a test
no, might it not be simpler to use a Form (which has plenty of usable
interactive events) rather than a report?

John W. Vinson [MVP]
 

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

Similar Threads


Top