Hey Guys,
I'm working on an invoice database and have run into a little snag due to my lack of VB knowledge. I was wondering if you guys might be able to help out.
I've got a invoice entry form which has two text boxes [name] and [invoice number]. The user enters the name first, then the invoice number second. What I want to happen is when the user moves out of the [invoice number] field, if there is another invoice with the same name and invoice number in the table, I want the background of the [invoice number] text box to turn red. This allows the user to visually see if he/she has entered this combination before.
Here's what I was thinking of...
1. User leaves [Invoice Number] text box
2. A Make Table Query is run (check_duplicates) which returns records with the same [name] and [Invoice Number] as the form currently has.
3. Somehow (VB) check to see if there are any records in the table.
4. Turn [Invoice Number] text box red or green on form.
Any help with how I might code this would be greatly appreciated
Thanks,
Chris C.
I'm working on an invoice database and have run into a little snag due to my lack of VB knowledge. I was wondering if you guys might be able to help out.
I've got a invoice entry form which has two text boxes [name] and [invoice number]. The user enters the name first, then the invoice number second. What I want to happen is when the user moves out of the [invoice number] field, if there is another invoice with the same name and invoice number in the table, I want the background of the [invoice number] text box to turn red. This allows the user to visually see if he/she has entered this combination before.
Here's what I was thinking of...
1. User leaves [Invoice Number] text box
2. A Make Table Query is run (check_duplicates) which returns records with the same [name] and [Invoice Number] as the form currently has.
3. Somehow (VB) check to see if there are any records in the table.
4. Turn [Invoice Number] text box red or green on form.
Any help with how I might code this would be greatly appreciated
Thanks,
Chris C.