If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Message Box Assisstance
Hi,
I have a field DriverNo in a table called tblStaff. I have made the property Indexed to be Yes (No Duplicates). I would like a message to pop up if a user tries to enter a duplicate DriverNo. I've never used Message Boxes before. Thanks Greg. |
#2
|
|||
|
|||
Message Box Assisstance
"Greg" wrote in message
... Hi, I have a field DriverNo in a table called tblStaff. I have made the property Indexed to be Yes (No Duplicates). I would like a message to pop up if a user tries to enter a duplicate DriverNo. I've never used Message Boxes before. You will get a run-time error message for free if a duplicate entry is attempted. Regards, Keith. www.keithwilby.com |
#3
|
|||
|
|||
Message Box Assisstance
Where (from a form, from a datasheet) and When (upon entry of the data for
Driver No, when the record is saved)? Assumption: Entry on a form into a control. When exiting the control after updating it, you want a message warning the user that this is a duplicate and cannot be saved. Private Sub txtDriverNoControlName _AfterUpdate() IF DCount("*","TblStaff","[Driver no]=" & Chr(34) & me.txtDriverNoControlName & Chr(34)) 0 Then MsgBox "This Driver Number is a duplicate. You may not be able to save this record",,"Suspected Duplicate" END IF End Sub If Driver No is a number field and not a text field then remove the Chr(34) from the DCount. "Greg" wrote in message ... Hi, I have a field DriverNo in a table called tblStaff. I have made the property Indexed to be Yes (No Duplicates). I would like a message to pop up if a user tries to enter a duplicate DriverNo. I've never used Message Boxes before. Thanks Greg. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sharing Outlook 2003 calendar | Noel All | Installation & Setup | 11 | August 22nd, 2005 05:26 PM |
Outlook Express is slow | ava cohen | Outlook Express | 18 | August 27th, 2004 12:17 AM |
error message - server rejecting recipient | Ken | Outlook Express | 5 | August 20th, 2004 06:39 PM |
msimn.exe-Application error message | Blondenblue_uk | Outlook Express | 2 | July 23rd, 2004 01:03 PM |
trying to gain access to emails on old hard disk | wilfred | Outlook Express | 2 | July 13th, 2004 11:35 AM |