Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting Records

Status
Not open for further replies.

BobChesh

Technical User
Dec 13, 2001
39
0
0
GB
Folks,

I am trying to add a field in a table (via a query) to set a flag to either 1 or 0, depending on the previous value of one of the fields. i.e.

Request No Order No Flag
12345 456789 1
12345 654321 0
12345 987654 0
12346 658956 1
12346 785478 0
etc

I can do it in Excel (if a2=a1, 0,1) but having problems in Access.

Can anybody help please.

 
You can't do this, without using bookmarks or clones- because the way a table works - the previous record isn't always the previous record.

Access isn't just a table - it's a database. It doesn't matter what order records are in a table - because the data is cohesive and related without order of records.

You're going to have to rethink what you're doing. This is very impractical. Although this is 100% possible to achieve, I must warn you that due to the nature of a database, even if you are able to do it - it will fail. records are in no way ordered in a specific way permanently.

Anyways - if you really need to "drive" on with your idea - read Access help Clone and Access help Bookmark.

Randall Vollen
National City Bank Corp.
 
Randall

Brill,

Thanks for this. At least I will not be trying to do something wihich will fail.

Looks like a rethink is on the cards

Cheers

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top