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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Processing on Events not going like I think it should

Status
Not open for further replies.

bobleonard

Programmer
Mar 28, 2002
32
US
Hi,

I'm probably this is my first report that is just coding. Hopefully someone can enlighten me as to where I went wrong.

I first put the code "Me.A0.value = Str(mylonga)" in the open report event. I get the error: cannot assign a value to this variable. Debug shows I'm reading the correct data in the table.

Next, I move the code to the 'Format Event' in the Detail Section.

If I double-click on the report name, I get the form with no values. But if i do a 'Print Preview' I get the data in the table.
(I can live with this)

This is a report with all unbound text controls. I'll actually get 3 records per page.

The last thing I'm unsure about is: After I get my first three records out. How do I Paginate..to do the next three pages.
Thanks for any help.
BobLeonrd

 
Me.A0.value = Str(mylonga) should be Me!A0.value = Str(mylonga)

 
The change to: Me!A0.value = Str(mylonga) made no difference in open report event or the format report event. In the open report event, I got error-2448, cannot access the variable. It works with the code in the format-event on print-preview. Why? Mine is not to reason why. Consider the following format:

Record1-data Record2-data
Record3-data Record4-data

BL
 
You'll get the same error in trying to assign Values to Controls in the Form_Open event, and for the same reason: it's simply too early to be doing this!

I suspect the solution is the same, as well: Move the code to the Report_Load event.

The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top