General Report/VBA Query

reach_dev

New member
Local time
Today, 13:54
Joined
Aug 17, 2006
Messages
9
Hi,

I've starting developing some reports, which require some code behind them to achieve what I want.

I've had a look around google and read some posts on these forums. Rather than asking specifically for an answer for my problem I was wondering if anyone had any good resources to general VBA/Report coding that I might find useful.

I'll need to be selecting data from the recordset and do conditional events depending upon the value of this data.

Thanks for your help,
Dave.
 
reports generally do not need much code, unlike forms. if your tables and queries are properly designed, the reports should generate automatically.

what sort of things do you want to use code for on your reports?
 
I have done all I needed to do now...

I had two fields in my database > UnitPrice and UnitPriceAmmended.

UnitPriceAmmended would be -1 by default (indicating it isnt used). However, if at some point the user opted to override the generated unitprice, then the ammended price would be given this value.

I was using my report to display the items contained within an order and didn't want to show UnitPrice and UnitPrice ammended, as it looked very unprofessional. I needed to do a conditional check on the value of UnitPriceAmeneded to see if it was -1. If so, populate the textbox with UnitPrice instead.

These values were then used to generate the subtotal etc. It took me a while to find that you have to include each datafield in the report *somewhere* if you wish to refer to it programatically so I just shoved some hidden textboxes in there.

Really was very simple when it all clicked together.
 

Users who are viewing this thread

Back
Top Bottom