Query Incremenal count

C

Craig

I apologize for my earlier posting. I mentioned that I
was using EXCEL 2002 - I meant to say, ACCESS 2002.
Please disregard the earlier post - Thanks.

I have a query with 2
fields: "Account" and "Transaction Type". I'd like to
add a calculated field that returns a '1' or '2' based on
when a particular "Transaction Type" ('Opening Bal')
occurs. Then, repeat that value until the next break
in 'Account'. For example:

Account Trans Type Expr1
1111 Credit 1
1111 Debit 1
1111 Wire Trans 1
1111 Opening Bal 2
1111 Debit 2
1111 Credit 2
1111 Debit 2
1111 Wire Trans 2
2222 Debit 1
2222 Credit 1
2222 Wire Trans 1
2222 Opening Bal 2
2222 Debit 2
2222 Credit 2
...
...
...

Hopefully, you can see where I'm going with this.
Everytime 'Opening Bal' occurs I would like the value '2'
to continue until the next break in "Account".

Thanks in advance for any help.
 

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