Jump to content
Xtreme .Net Talk

kutz

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by kutz

  1. Hi all, I am having a problem with a databound combobox in that when I save the record (ie, end current edit,update the database and accept the changes) the combobox resets its value back to the first object in the list. Anyone else experienced this problem before? My code for saving goes something like this. 'MsgBox("Record Saved") 'Create a new dataset to hold the changes that have been made to the main dataset. Dim objDataSetChanges As Buckner_Intranet.dsNCR = New Buckner_Intranet.dsNCR 'Stop any current edits. Me.BindingContext(DsNCR1, "NCR").EndCurrentEdit() Me.BindingContext(Me.DsNCR1, "Responses").EndCurrentEdit() 'Get the changes that have been made to the main dataset. objDataSetChanges = CType(DsNCR1.GetChanges, Buckner_Intranet.dsNCR) 'Check to see if any changes have been made. If (Not (objDataSetChanges) Is Nothing) Then Try Me.BindingContext(Me.DsNCR1, "NCR").EndCurrentEdit() Me.BindingContext(Me.DsNCR1, "Responses").EndCurrentEdit() daNCR.Update(Me.DsNCR1, "NCR") daResponses.Update(Me.DsNCR1, "Responses") Catch eUpdate As System.Exception MsgBox(eUpdate.Message) End Try 'Commit the changes that were just merged 'This moves any rows marked as updated, inserted or changed to being marked as original values DsNCR1.AcceptChanges() End If Cheers for any help you might be able to offer. Kutz
  2. Cheers gents for your replies so far. I'm fine with standard keypress event handling. What I am trying to do is simulate a key being pressed within a particular control. (In this case, a DateTimePicker) So the idea being that without the user touching a key, the program acts as if a user hit the 'enter' key while that control is focussed. The trigger for this is clicking a button on the form. Thanks for your help.
  3. Greetings, As indicated in the title I am trying to work out how to raise a keypress event in code, something I cannot find an article or tutorial on anywhere!! Which, to me, would be counter-inuitive as it would seem to be incredibly simple. Any help would be greatly appreciated. Regards, Kutz
  4. I may have a veeery simple solution for you. Apparently if there is an ampersand ( & ) symbol in the path to your project it can often break this wizard. Give it a go. Rename any folders in your project that contain an ampersand and try to generate the dataset.
×
×
  • Create New...