jeevs
10-29-2002, 06:01 AM
I'm beginning to understand now.
So after the "Exit Sub" and "End If" statement. I input the textboxes to be inputted below before "com1add.Caption = &Add", is that it? If so, how can I acknowledge that the textboxes like txtsaleflatno, txtsaleprice are being inputted? is it something like txtsaleflatno.DataChanged ?
And even if all textboxes have been acknowledged, if I still click "Done" it still enquires on the Msgbox stated earlier within the procedure whether i wish to add a new record. How do I remove that?
Private Sub com1add_Click()
Dim intResponse As Integer
Beep
intResponse = MsgBox("Do you wish to add a new HDB record?", _
vbYesNo + vbQuestion, _
"Add an HDB For Sale Record")
If intResponse = vbYes Then
If com1add.Caption = "&Add" Then adosale.Recordset.AddNew 'Addnew record here
com1add.Caption = "Done"
Exit Sub
End If
'Do I add those acknowledge textboxes here???'
com1add.Caption = "&Add" 'Didn't exist earlier
End If
End Sub
-jeevs
PS: I appreciate your help. Really. Thank you.
So after the "Exit Sub" and "End If" statement. I input the textboxes to be inputted below before "com1add.Caption = &Add", is that it? If so, how can I acknowledge that the textboxes like txtsaleflatno, txtsaleprice are being inputted? is it something like txtsaleflatno.DataChanged ?
And even if all textboxes have been acknowledged, if I still click "Done" it still enquires on the Msgbox stated earlier within the procedure whether i wish to add a new record. How do I remove that?
Private Sub com1add_Click()
Dim intResponse As Integer
Beep
intResponse = MsgBox("Do you wish to add a new HDB record?", _
vbYesNo + vbQuestion, _
"Add an HDB For Sale Record")
If intResponse = vbYes Then
If com1add.Caption = "&Add" Then adosale.Recordset.AddNew 'Addnew record here
com1add.Caption = "Done"
Exit Sub
End If
'Do I add those acknowledge textboxes here???'
com1add.Caption = "&Add" 'Didn't exist earlier
End If
End Sub
-jeevs
PS: I appreciate your help. Really. Thank you.