code for skipping record if a condition isn't met

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I'd like to skip a record on a report if a condition isn't met.

Something like:

If txtCode < "B" then skip record.

Thanks.
 
SAC said:
I'd like to skip a record on a report if a condition isn't met.

Something like:

If txtCode < "B" then skip record.

Thanks.

Not sure what you're looking for here.

Skip the record or skip the field?
Do you mean something like not showing a field in the report?
In the Detail Format event:

txtCode.Visible = txtCode >= "B"

Or moving completely to the next record?
Look up:

NextRecord
MoveLayout
PrintSection

in VBA help.
Open any code window and click help.
 
I think you are looking skipping a record in a report.
The symplest way would be to base the report on a query
rahter than a table. In the query you can tell it in the
criteria specify < "B"
Hope this helps.
Fons
 
Back
Top