Dynamic label in a report (lbl.caption goes wrong)

  • Thread starter Thread starter Carl Seys
  • Start date Start date
C

Carl Seys

Guest
Depending a value in field of a record (grouped in the report), I would like to have a label filled-in a the moment of Format.

So the code should be something like :
Private Sub Details_Format (...)
if Me.StockStatus = 1 then Me.lblHeader.Caption = "New car"
if Me.StockStatus = 2 then Me.lblHeader.Caption = "Second Hand"
End Sub

Problem :
The method 'Caption' does not figure in the dropdownlist.

So how should I create a dynamic label in a report ?

(In a form, the Caption method is shown.)
 
I just gave it a try in Access '97 and the .Caption property never appeared. I included .Caption in the code however, and the result worked fine.

I can't understand why it doesn't appear but it works fine.
 
Sometimes there are certain properties that don't appear in a formula becaue access only shows what is of the same type (boolean,integer,object,...) If the propertie shows up if you make a new line of code with the item only then you can still use it.
 
Strange, the caption is not shown, but is accepted in the code.
It works, so ...

Thanks for help !
Carl
 

Users who are viewing this thread

Back
Top Bottom