problem wth primarykey

Hi All,

I have created a enquiry table , vth id,cname,surname as primarykey fields.

when i am trying to insert records into this table through a Mastercard , am getting a error whch says…

" you can’t enter because the old value of the field below is =’ " , field :

table : enquiry.

Plz help me out …



Hi Venu,

A couple of question spring to mind:

What is the field type of

Is the NotBlank property set on this field?

Can you post a sample of the code?

HI ,

The field is of Text type , i didnt set notblank property for tht field And i am using No.series functionality on Enq-id field…

It sounds to me like you don’t really understand what a primary key is. Get a senior involved and have them explain the basics of table design to you. Ask about the specifics of primary keys, about secondary keys, foreign keys, table relationships, sort orders, data types, all that sort of thing. You will not be an effective developer if you don’t understand these concepts. This forum is not the right place to get this information. You need training, a good book on the topic maybe, but definately some help from another person sitting next to you.

In this special case you should (beside following the hints from Daniel) set the “DelayedInsert” property of the form to “yes”.

This makes sure that the record is not being inserted to early.

On the other hand your primary key sounds quite weird and the name of the fields should be a readable text and only use abbreviations where they make sense.
It is good practice to check the naming of similar fields in other tables. It makes it easier to read code when a certain field with a special purpose uses a name which explains the content.

Depending on what your “vth id” means, consider renaming it to a kind of “Code” or “No.”. It is very common to call primary key fields of a table with some “No.” and/or “Code” in it.