Duplicate entry for invoices entered

P

Please help James

I am trying to create a simple invoice entry form. And I need help creating
a code that would prevent a user from entering a duplicate number for each
vendor entered.
I noticed that If I prevented duplicates numbers at the table level it would
work, however it would prevent duplicate numbers for all vendors.....which
would not work. I have only four fields, me.vendorname, me.vendorno,
me.invdate, me.invamount; the table is called "entry". Any help is
appreciated, thanks.
 
A

Armen Stein

I am trying to create a simple invoice entry form. And I need help creating
a code that would prevent a user from entering a duplicate number for each
vendor entered.
I noticed that If I prevented duplicates numbers at the table level it would
work, however it would prevent duplicate numbers for all vendors.....which
would not work. I have only four fields, me.vendorname, me.vendorno,
me.invdate, me.invamount; the table is called "entry". Any help is
appreciated, thanks.

Create an index on the table that includes both the Vendor and Invoice.
To do this isn't totally intuitive; you need to add another field to the
index on the next line. Make that index unique, and you're all set.
 
P

Please help James

Armen, am I understanding you correctly...enter both the vendor name and
invoice number in the same field? How do you go about enntering the
information on the form?
 
P

Please help James

Armen....you are awsom, I just figured it out....you go to view then indexes
in order to create the connection.
 

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