Create report in MS-ACCESS

  • Thread starter Thread starter cdolphin88
  • Start date Start date
C

cdolphin88

Hello,


I'm new in creating report in Ms-Access and I have some questions.


I want to display a text Hong Kong Dollars when a field in my database
is = "HKD" and display a text Patacas when this field is
= "MOP".


Is there possible?


I'm using Visual Basic 6 to "access" the database. Input data, read
data from the db, print the report that is made inside the
MS-ACCESS.


Can someone help me?


Cheers!


Claudia
 
Claudia

I would use an unbound field we will call it display_text

Then using click on the detail property, this is the little square next to
the word detail on your report in the design view, and select the detail
print event

Your field name must be in the report but it can have the visible property
set to false

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

select case ucase$(fieldname)

case "HKD"
me!display_text ="Hong Kong Dollars "

case "MOP"
me!display_text ="Patacas"
end select

end sub

use the UCASE$ function if the data is in lowercase
 
Back
Top