Counting records in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Thanks for reading this!
I've set up a basic membership database - where members can log in and out
using their own unique 3 digit number, which they choose. The problem is
that when someone joins, they might pick a number that already exists. I've
tried making it the primary key field, but no warning appears, it just
doesn't write the record to the database. I've created a query for that
number, to see if it already exists, but I don't know how to use that total
in a conditional field of a macro. I've also tried counting existing numbers
and writing it into a table but I don't know how to access that total! (I
don't know much, it seems).
I only have a basic knowledge of Access - and don't know anything about SQL.
I can write simple macros to do what I need done!
If anyone can give me any clues/ideas I'd appreciate it!
Cheers.
 
Thanks for your reply. If I do this, when I add a new record with the same
login, the record is not saved, but no warning appears. This is no use - as
I need the inputter to know that the login already exists. That's why I
thought about a query to count how many occurences of this login there are -
and if there are more than 0 to show a message box to warn the user.
 
Back
Top