Eljefegeneo
Still trying to learn
- Local time
- Today, 15:18
- Joined
- Jan 10, 2011
- Messages
- 899
Using Access 2010.
I have a sub form [subClientLanguages] on a main form [frmMain] that list the languages which a person can speak.
The languages come from a tblLanguages which has two fields: LanguageID and Language.
tblClientLanguages which has three fields: ID (PK), ClientID (which is the relationship to the tblMain: frmMain) and Language (which is a combobox): [SELECT [tblLanguages].[Language] FROM tblLanguages;]
I then made a subform [subClientLanguages] on the main form [frmMain], this subform is based on the tblClientLanguages.
What I would like to do is have some code so that OnUpdate of a new language entry on the subform prevents entry of a duplicate Language.
I've tried Dcount, but can't seem to get the code correct.
I have a sub form [subClientLanguages] on a main form [frmMain] that list the languages which a person can speak.
The languages come from a tblLanguages which has two fields: LanguageID and Language.
tblClientLanguages which has three fields: ID (PK), ClientID (which is the relationship to the tblMain: frmMain) and Language (which is a combobox): [SELECT [tblLanguages].[Language] FROM tblLanguages;]
I then made a subform [subClientLanguages] on the main form [frmMain], this subform is based on the tblClientLanguages.
What I would like to do is have some code so that OnUpdate of a new language entry on the subform prevents entry of a duplicate Language.
I've tried Dcount, but can't seem to get the code correct.