There is no facility in BD to define Primary Keys, composite or not. And the relationships are not set up by explicitly linking a primary key to a foreign key as you might in another DBMS. What are you trying to achieve?
Any script is there to define two fileds Duplicate already exist
Any script is there to define two fileds should not be Duplicate
messagebox out already exist Data..............
I need 1 more help Can we Find By exact Field Name Data in above example here i have 1 to 1500 Entries of general number of year 2013 and 1 to 1700 entries of year 2014
when i used Find General =10 (it found 290 entries for both 2014 and 2013)
That should be fairly easy to do. One way would be to have a hidden field that was a concatenation of the two fields. Then you could have an on-edit script for both of the fields that would check the hidden field on all existing records to see if that combination was unique. If not it would throw up a message box.
You need to script it. See attached database. I have a form with two text fields (Field1 and Field2) and a third field (Field1Field2) which will hold the concatenation of the other two fields. I have an "on edit" script set for each field that uses the Action: Set Field Value (text). This is the script:
Great Matty , this thing help me alot ..
now how create messagebox out that This field is already exist......
and one more thing require , how i find by exact Field value for require database,
Here i have field which contain 1 to 3000 numbers serial wise
when i serach the folder by number it gives 300 search values for it....
I've given you a start ... you need to look into scripting.
From a script you can run a query to search records for a field value. If the number of records returned by the query is not equal to zero then you know the field exists and can then display the message box. You would also need to clear what the user had entered to enforce it.
You may not need a composite field if you just need to check if a 2 field combination is unique. Running a "and" query with a little scripting should warn you if there are multiple enteries. You could try the following.
Set 2 text variables to each field and use these in a "and" query searching on same fields. Have a IF EndIf check records returned by query and if more then 1 show message etc. Run this script after editing second field. Real application needs refining but this is general idea.
I've attached an updated version of the file Matty has written.
This one runs a query silently in the background that checks two variables. If a duplicated record is found, the value you entered will be cleared and a warning message will be displayed notifying the operator.