Click here to Skip to main content
15,885,914 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Tom Deketelaere5-Jul-09 22:27
professionalTom Deketelaere5-Jul-09 22:27 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay6-Jul-09 2:02
Colin Angus Mackay6-Jul-09 2:02 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Eddy Vluggen6-Jul-09 3:13
professionalEddy Vluggen6-Jul-09 3:13 
AnswerRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay6-Jul-09 2:05
Colin Angus Mackay6-Jul-09 2:05 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
kimbowa sande30-Jul-09 4:39
kimbowa sande30-Jul-09 4:39 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay30-Jul-09 10:02
Colin Angus Mackay30-Jul-09 10:02 
Questionhow to add sql statement in databinding?, vb 2005 Pin
wongth75-Jul-09 20:23
wongth75-Jul-09 20:23 
Questionproblem with delete button ..vb 2005 Pin
wongth75-Jul-09 20:17
wongth75-Jul-09 20:17 
hi guys..im having a problem with my delete button

(let's say my database has 3 records)

and while my form is showing record no.3, and i clicked on the delete button, it will delete record no.1..(it supposed to be deleting record no.3)....how to correct my code and make it delete the record shown on the form????

here's my code..
   Private Sub frmManager_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       'TODO: This line of code loads data into the 'UserDataSet2.Staffapplication' table. You can move, or remove it, as needed.
       Me.StaffapplicationTableAdapter.Fill(Me.UserDataSet2.Staffapplication)

       txtRecordno.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Srecordno")
       txtUsername.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Sname")
       txtPassword.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Spassword")
       txtHobby.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Shobby")

   End Sub

______________________________________________________________


Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click


        Dim intresult As Integer

        Try
            intresult = MessageBox.Show("Confirm Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
            If intresult = Windows.Forms.DialogResult.Yes Then
                Me.StaffapplicationBindingSource.RemoveCurrent()
                Me.StaffapplicationTableAdapter.Update(Me.UserDataSet2.Staffapplication)

            End If
        Catch ex As Exception
        End Try


(note: im using bindingSource for my textboxes anyway)
QuestionPrint Out Problem in Billing system??? Pin
JC.KaNNaN5-Jul-09 19:32
JC.KaNNaN5-Jul-09 19:32 
AnswerRe: Print Out Problem in Billing system??? Pin
EliottA6-Jul-09 2:53
EliottA6-Jul-09 2:53 
QuestionWrite to a word doc which is already open. Pin
Musa Biralo5-Jul-09 16:47
Musa Biralo5-Jul-09 16:47 
AnswerRe: Write to a word doc which is already open. Pin
Christian Graus5-Jul-09 17:03
protectorChristian Graus5-Jul-09 17:03 
QuestionSorting a structure array Pin
Jacob Dixon5-Jul-09 11:53
Jacob Dixon5-Jul-09 11:53 
AnswerRe: Sorting a structure array Pin
Luc Pattyn5-Jul-09 12:40
sitebuilderLuc Pattyn5-Jul-09 12:40 
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 12:44
Jacob Dixon5-Jul-09 12:44 
AnswerRe: Sorting a structure array Pin
Gideon Engelberth5-Jul-09 12:44
Gideon Engelberth5-Jul-09 12:44 
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 13:52
Jacob Dixon5-Jul-09 13:52 
GeneralRe: Sorting a structure array Pin
Gideon Engelberth5-Jul-09 15:56
Gideon Engelberth5-Jul-09 15:56 
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 15:59
Jacob Dixon5-Jul-09 15:59 
GeneralRe: Sorting a structure array Pin
Luc Pattyn6-Jul-09 0:46
sitebuilderLuc Pattyn6-Jul-09 0:46 
QuestionDrag&Drop problem Pin
The real $M@5-Jul-09 0:17
The real $M@5-Jul-09 0:17 
AnswerRe: Drag&Drop problem Pin
Mycroft Holmes5-Jul-09 2:14
professionalMycroft Holmes5-Jul-09 2:14 
GeneralRe: Drag&Drop problem Pin
Henry Minute5-Jul-09 4:18
Henry Minute5-Jul-09 4:18 
GeneralRe: Drag&Drop problem Pin
Mycroft Holmes5-Jul-09 14:10
professionalMycroft Holmes5-Jul-09 14:10 
AnswerRe: Drag&Drop problem Pin
Alan N5-Jul-09 4:05
Alan N5-Jul-09 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.