|
-
Jun 21st, 2005, 02:32 AM
#4
Re: How to delete current record in bounded form?
Private Sub cmdDelete_Click()
Dim x As Variant
x = MsgBox(" You are abut to delete " & Me.customerName & " from this table - proceed ? ", vbOKCancel)
If x = 1 Then
With myRS
.Delete
.MoveFirst
End With
End If
End Sub
/\ you put it in your delete code.. but I don't think you set it to anything (or should it be the recordset on the form?)
DAO:
set rst = dbengine(0)(0).openrecordset("table or sqlstatement")
set rst = currentdb.openrecordset("table or sqlstatement")
ADO:
set rst = new adodb.recordset
strsql ="sql statement"
rst.open strsql,currentproject.connection,2,3,1 'dynamic, optimistic, adcmdtext
'or
strsql ="table"
rst.open strsql,currentproject.connection,2,3,adcmdtable 'dynamic, optimistic, adcmdtable
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|