472,108 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,108 software developers and data experts.

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

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
4 2164
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
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
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
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.

Similar topics

24 posts views Thread by Michael Malinsky | last post: by
1 post views Thread by monskie | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.