473,396 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

I am not able to use caption on label in my report!!!

222 100+
Hello everybody,


I have a report (invoice) I made module called "number2string"(int double) as string

My module takes the number and return to me the number written as string. Example number2string(4)="four"

Every time I print out my reports I need the sum of [total] be written in a label called amountlabel.

I use this code it is working well when I open "Invoice" but not on printing out.

Expand|Select|Wrap|Line Numbers
  1. MsgBox [total]
  2. Me.amountlabel.Caption =number2string(total) 
  3.  
Where Do I have to put my code for each time we print out the invoice report the amountlabel will be filled automatically

NB: I tried to put it on page event and it is not working too.


Any suggestion about this subject.


CHEERS


WASSIM S DACCACHE
CCE
Jun 2 '08 #1
4 1523
NeoPa
32,556 Expert Mod 16PB
Which event triggers your code to run (Which event procedure is it within)?
Jun 2 '08 #2
NeoPa
32,556 Expert Mod 16PB
I put my code in the Format event procedure of the Detail section (where my label is) and it works without problem (I'm using Access 2000 here).
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.     Me.Label3.Caption = Me.Text2
  3. End Sub
Jun 2 '08 #3
wassimdaccache
222 100+
I was putting the code on "ON PAGE" event .it wasn't working there when I put it on "ON FORMAT" it works


Thank you NEO

Have a nice day


WASSIM S DACCACHE
CCE
Jun 2 '08 #4
NeoPa
32,556 Expert Mod 16PB
No worries Wassim. The Page event is too late in the day to allow changes to data. It is simply to superimpose graphics onto the already created graphic of the page.
Jun 2 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: Grim Reaper | last post by:
I know this is probably an easy question, but I could not find/figure it out. Basically, I am printing mailing labels with a "Sorting/Grouping" section that groups the label types together....
2
by: john young | last post by:
when settingup a label report in access using the wizard the resulting previw and print out is not as it should be .... example is using Avery labels(or any other). 24 to page ...3col by 8 rows......
1
by: Mark | last post by:
Hi All, I have set up a simple database to create labels for bottles. I insert a set number of records into a table and have produced a label report based on that table. After a bit of tweaking,...
1
by: chris_huh | last post by:
Using the Label Wezard you can easily make labels for all the records in the table, but is there a way to make just one. I have a form that shows the data from a single recordset and on that...
3
by: John | last post by:
In my app I've created a label report (Avery 7162, 2 colums, 8 rows) with the wizzard. The report is based on a temp table that is created when the user pushes a button. After creation of the table...
1
by: jkdudhatra | last post by:
How To Change Report Caption Label Property Of Data Report In Visual Basic 6 ?
3
by: Apple001 | last post by:
I am having hard time finding the way to make the database below. I have: -Form "frmInvoice" with subform "Allocation" based on table "tblInvoice" and "tblAllocation". "invID" is auto number in...
1
by: AMD_GAMER | last post by:
Hi, I am trying to print address labels. I have a form which asks for the user to input the first name, middle initial, and last name. On the button click to print the label, I have an event...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.