I Have a access data base, and have a field "Card No"
if we think starting no is 1 and ending no will be 20. some times some numbers are missing and some are not in this range, ex. 21
How can I make a missing no report?

You can either create a table (we'll can it the index table) that contains all the card numbers that should be in the database and then join it to your table to see if there are any records in the index table that doesn't have a corresponding record in your table.

The other option is to use vba to create a loop that that starts at the min card value and ends at the max card value. Within the loop, test to see if a record exists that matches the current loop count.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.