Maintennace Forms and PK queries


Author
Message
Ian Hammond
Ian Hammond
StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)StrataFrame Novice (65 reputation)
Group: Forum Members
Posts: 57, Visits: 277
Hi,

I have the following 2 queries:

1) I have a maintenance form with 2 bound textboxes, 1 textbox for a db field name (textBox1) and the other for a friendly display name (textBox2). During New i would like the friendly name to be the mirror of the field name whilst the user is inputting the data. I have set. In the Change event on textBox1 I set

     textBox2.Text = textBox.Text

When I run the app and attempt to create a new record, I enter a character into textBox1 the change event is invoked and the data is copied to textBox2 but then the character is obliterated. Any subsequent keypress results in a blank textBox1 and textBox2. I have noticed that there seems to be multiple calls to the change event when a single key is pressed.  Does anyone have an explanation for this?

2) When I update a new record I get the error "Cannot insert the value NULL into config_pk etc. I have the properties on the PrimaryKeyIsAtoIncremented= True and PrimaryKeyIsUpdateable= false. Is there another property that I should look out for?

many thanks

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search