code for skipping record if a condition isn't met

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.
 
F

fredg

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.
 
F

Fons Ponsioen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top