Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to warn user of duplicate records at form entry

Status
Not open for further replies.

grei123

Technical User
Jan 29, 2006
2
IE
Trying to warn user of duplicate records at form entry
I have a form which brings up details of a student and a subform where data can be entered for the student. They are linked by pupilID field. Most of the fields on the subform are combobox lookup fields which lookup different tables for their values. Also on the subform is a Tickbox control. I need to be able to show the user whether the underlying table contains duplicate records as they are entering the data. I was going to try using the afterupdate event on subform but the actual values on the subform are not the same as the values on the underlying table. Ie the combobox on the form shows the content of the name field (Text) but the table contains the index ID values (Numbers). ANY HELP
 
I know the combo box shows the user the text, but in the query behind the combobo, is this exactly displaying the IDnumber and the text... in the column count is this displaying 1 or 2.

If its displaying 2 then the id number is probably hidden, but if its displaying 1, then all you have to do is go into the query add the id number, then back in the properties of the combo box, change the column count to 2, and then make sure the idnumber column width is "0".

If your table is gathering the IDnumber when a user enter information into the combobox, then i would assume the idnumber is hidden...

if in doubt just create some quick code in the afterupdate procedure, like msgbox comboboxname.text, and this will show you what exactly you are going to be filtering on.

I hope this helps..
 
Thanks for the help. This is the problem I have a table named Competition with fields PupilID, DanceID both numeric and a checkbox named winner. I have a form with 2 comboboxes and a checkbox named pupil, dancetype and winner. This form gets the info from other tables and stores it in the Competition table.The user selects from different tables the relevent info using the comboboxes on the form and then ticks whether they are a winner. Before the user moves to a new record I need to show them whether the record was entered before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top