ms access - What event will fire each time a report is previewed/printed? -
i evauluate value of textbox report control , hide or display based on value, can achieve vba:
if me.fixed.value = 0 me.fixed.visible = false end if
that works fine, query using report's record source allows range of records printed @ once (1 per page/report), , want above code run each page/report. unsure of put code each record play rules. currently, if choose range of 8 records, first 1 want, , navigate through other records in print preview screen format of report remaining unchanged when should changing.
i have tried following events:
report:
- on current
- on load
- on got focus
- on open
- on activate
- on page
section:
- on format
- on print
- on paint
where can put vba each time scroll through/navigate range of records returned on report code runs?
you need set visible
property true well, otherwise remain invisible.
i'm using format event of details section:
private sub detail_format(cancel integer, formatcount integer) if me.fixed = 0 me.fixed.visible = false else me.fixed.visible = true end if end sub
this works in print preview not in report view. there way work report view, never use view.
the statement can simplified:
me.fixed.visible = not (me.fixed = 0)
Comments
Post a Comment