By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Text Boc on Report won't hold user data entry...

P: n/a
I have created a report. This report needs to display records
between two dates entered by the user. I put two text boxes on the
report so I can enter the start and end date - I set them to use an
input mask of 'short date' format. The problem is that when I enter
anything in these text boxes, as soon as the field looses focus, the
text is cleared out - thus the text box is left blank. I have a button
on the form that calls the requery method of the report and also, as a
test, displays the values of these text boxes in a msgbox, but it also
shows they are blank. What is wrong? I can set the values by code for
the text boxes in the button's click event before calling the requery
method, and the report runs with the proper data and also shows the
text in those text boxes - I just can't seem to type values into these
text boxes. Please help! Thanks!

Andrew

Sep 17 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Sep 17, 8:56 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+"
<amead...@hotmail.comwrote:
I have created a report. This report needs to display records
between two dates entered by the user. I put two text boxes on the
report so I can enter the start and end date - I set them to use an
input mask of 'short date' format. The problem is that when I enter
anything in these text boxes, as soon as the field looses focus, the
text is cleared out - thus the text box is left blank. I have a button
on the form that calls the requery method of the report and also, as a
test, displays the values of these text boxes in a msgbox, but it also
shows they are blank. What is wrong? I can set the values by code for
the text boxes in the button's click event before calling the requery
method, and the report runs with the proper data and also shows the
text in those text boxes - I just can't seem to type values into these
text boxes. Please help! Thanks!

Andrew
You did mean that the txt boxes were on the form that calls the
report, and not the report itself, right?

Sep 17 '07 #2

P: n/a
On Sep 17, 11:42 am, OldPro <rrossk...@sbcglobal.netwrote:
On Sep 17, 8:56 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+"

<amead...@hotmail.comwrote:
I have created a report. This report needs to display records
between two dates entered by the user. I put two text boxes on the
report so I can enter the start and end date - I set them to use an
input mask of 'short date' format. The problem is that when I enter
anything in these text boxes, as soon as the field looses focus, the
text is cleared out - thus the text box is left blank. I have a button
on the form that calls the requery method of the report and also, as a
test, displays the values of these text boxes in a msgbox, but it also
shows they are blank. What is wrong? I can set the values by code for
the text boxes in the button's click event before calling the requery
method, and the report runs with the proper data and also shows the
text in those text boxes - I just can't seem to type values into these
text boxes. Please help! Thanks!
Andrew

You did mean that the txt boxes were on the form that calls the
report, and not the report itself, right?- Hide quoted text -

- Show quoted text -
No, the text boxes are directly on the report. They are unbound. I
can click on them and type into them, but as soon as I tab out of them
or click the other text box, or button, they were cleared out.

I now have the load event of the report coded to set the value
properties of the controls to initial dates and a call to the report's
requery method, and that works fine. However, if I try to edit the
text fields, they revert back to the values set in the load event as
soon as they loose focus.

The report is based on a saved query that uses the values from the
text boxes from the report to filter the querry.

Sep 17 '07 #3

P: n/a
On Sep 17, 10:54 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A
+" <amead...@hotmail.comwrote:
On Sep 17, 11:42 am, OldPro <rrossk...@sbcglobal.netwrote:


On Sep 17, 8:56 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+"
<amead...@hotmail.comwrote:
I have created a report. This report needs to display records
between two dates entered by the user. I put two text boxes on the
report so I can enter the start and end date - I set them to use an
input mask of 'short date' format. The problem is that when I enter
anything in these text boxes, as soon as the field looses focus, the
text is cleared out - thus the text box is left blank. I have a button
on the form that calls the requery method of the report and also, as a
test, displays the values of these text boxes in a msgbox, but it also
shows they are blank. What is wrong? I can set the values by code for
the text boxes in the button's click event before calling the requery
method, and the report runs with the proper data and also shows the
text in those text boxes - I just can't seem to type values into these
text boxes. Please help! Thanks!
Andrew
You did mean that the txt boxes were on the form that calls the
report, and not the report itself, right?- Hide quoted text -
- Show quoted text -

No, the text boxes are directly on the report. They are unbound. I
can click on them and type into them, but as soon as I tab out of them
or click the other text box, or button, they were cleared out.

I now have the load event of the report coded to set the value
properties of the controls to initial dates and a call to the report's
requery method, and that works fine. However, if I try to edit the
text fields, they revert back to the values set in the load event as
soon as they loose focus.

The report is based on a saved query that uses the values from the
text boxes from the report to filter the querry.- Hide quoted text -

- Show quoted text -
I've never heard of anyone getting it to work that way. By the time
the report can read the text boxes, the data has already been
queried. Access expects controls on a report to display data, nothing
more. You would be better off putting the code in the routine that
calls the report.

Sep 17 '07 #4

P: n/a
On Sep 17, 1:50 pm, OldPro <rrossk...@sbcglobal.netwrote:
On Sep 17, 10:54 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A

+" <amead...@hotmail.comwrote:
On Sep 17, 11:42 am, OldPro <rrossk...@sbcglobal.netwrote:
On Sep 17, 8:56 am, "Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+"
<amead...@hotmail.comwrote:
I have created a report. This report needs to display records
between two dates entered by the user. I put two text boxes on the
report so I can enter the start and end date - I set them to use an
input mask of 'short date' format. The problem is that when I enter
anything in these text boxes, as soon as the field looses focus, the
text is cleared out - thus the text box is left blank. I have a button
on the form that calls the requery method of the report and also, as a
test, displays the values of these text boxes in a msgbox, but it also
shows they are blank. What is wrong? I can set the values by code for
the text boxes in the button's click event before calling the requery
method, and the report runs with the proper data and also shows the
text in those text boxes - I just can't seem to type values into these
text boxes. Please help! Thanks!
Andrew
You did mean that the txt boxes were on the form that calls the
report, and not the report itself, right?- Hide quoted text -
- Show quoted text -
No, the text boxes are directly on the report. They are unbound. I
can click on them and type into them, but as soon as I tab out of them
or click the other text box, or button, they were cleared out.
I now have the load event of the report coded to set the value
properties of the controls to initial dates and a call to the report's
requery method, and that works fine. However, if I try to edit the
text fields, they revert back to the values set in the load event as
soon as they loose focus.
The report is based on a saved query that uses the values from the
text boxes from the report to filter the querry.- Hide quoted text -
- Show quoted text -

I've never heard of anyone getting it to work that way. By the time
the report can read the text boxes, the data has already been
queried. Access expects controls on a report to display data, nothing
more. You would be better off putting the code in the routine that
calls the report.
I've not heard of that either. A report is read only.
It's just not possible to enter data on a formated report.
You should set the date criteria in text boxes on your form to use as
a filter for your report record source.
Or use [Enter Start/End Date] in your report query criteria to invoke
an Input box when loading the report.

Sep 17 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.