Need Help with Multiple Forms / Recordset.Bookmark Method /Action Cancelled 
Author Message
 Need Help with Multiple Forms / Recordset.Bookmark Method /Action Cancelled

Setup =  VB4.0   Access97

Problem = When trying to Bookmark on OrderEntry2.frm i get
" Run Time Error - 3426  The Action was cancelled by an associated
object"

I can not find this Error Number in the help files. Have no idea what
is causing it. Can you help?

If I Rem out the
"Data1.Recordset.Bookmark = Data1.Recordset.LastModified"
Line on OrderEntry1.frm I do not get the error on OrderEntry2.frm.

I first open OrderEntry1.frm to get customer personel information such
as name, address, etc...

After the phone number is entered I have it set to move to
OrderEntry2.frm which is the Order Detail. The following is on
OrderEntry1.frm ( the same code is used on a command button of the
same form)

*********************************************************************************************************
Private Sub txtPhone_LostFocus(Index As Integer)

    Dim UserInput As String
    If txtPhone(9) = "" Then
        MsgBox "Customers Phone Number cannot be left blank!", 48,
"Missing Entry"
        txtPhone(9).SetFocus
    ElseIf Len(txtPhone(9)) = 7 Then
        UserInput = txtPhone(9)
        txtPhone(9) = "(   ) " & Format(UserInput, "###-####")
    ElseIf Len(txtPhone(9)) = 10 Then
        UserInput = txtPhone(9)
        txtPhone(9) = Format(UserInput, "(###) ###-####")
    ElseIf Len(txtPhone(9)) = 14 Then
        'Do Nothing
    End If
    Move2Detail = MsgBox("Move to Order Detail?", 36, "Question?")
    If Move2Detail = 6 Then
        'Check for blank required fields
        If cboCusTitle = "" Then
            MsgBox " Customer Title cannot be left blank", 48,
"Missing Entry"
        ElseIf txtFirst(2) = "" Then
            MsgBox " Customers First Name cannot be left blank", 48,
"Missing Entry"
        ElseIf txtLast(4) = "" Then
            MsgBox " Customers Last Name cannot be left blank", 48,
"Missing Entry"
        ElseIf txtAddress(5) = "" Then
            MsgBox " Customers Address cannot be left blank", 48,
"Missing Entry"
        ElseIf txtCity(6) = "" Then
            MsgBox " Customers City cannot be left blank", 48,
"Missing Entry"
        ElseIf cboState = "" Then
            MsgBox " Customers State cannot be left blank", 48,
"Missing Entry"
        ElseIf txtZipCode(8) = "" Then
            MsgBox " Customers ZipCode cannot be left blank", 48,
"Missing Entry"
        ElseIf txtPhone(9) = "" Then
            MsgBox " Customers Phone cannot be left blank", 48,
"Missing Entry"
        Else
        On Error Resume Next
        Data1.UpdateRecord
            If Err.Number = 524 Then
                Msg = "Error # " & Str(Err.Number) & " Duplicate Order
Number found!"
                MsgBox Msg, 48, "Error"
                Err.Clear
            Else
            Data1.Recordset.Bookmark = Data1.Recordset.LastModified
            frmEnterOrder2.txtOrderNum(0) = txtOrderNum(0)
            frmEnterOrder2.txtOldTotal = txtBalance(11)
            frmEnterOrder2.Show
            frmEnterOrder1.Hide
            End If
        End If
    Else
        'Do Nothing
    End If

End Sub
******************************************************************************************************

The following is on OrderEntry2.frm Update Button

*******************************************************************************************************
Private Sub cmdUpdate_Click()
    If txtItemNum = "" Then
        MsgBox "There is nothing to save!, Please select an item", 48,
"Missing Entry"
    ElseIf txtQty = "" Then
        MsgBox "Quantity cannot be left blank", 48, "Missing Entry"
    ElseIf cboEmpID = "" Then
        MsgBox "Employee I.D. cannot be left blank", 48, "Missing
Entry"
    Else
        Data4.UpdateRecord
        Data4.Recordset.Bookmark = Data4.Recordset.LastModified
        txtOrderNum(0) = frmEnterOrder1.txtOrderNum(0)
        txtOldTotal = txtOrderTotal
        cmdAdd.Enabled = True
        cmdAdd.SetFocus

    End If
End Sub
********************************************************************************************************



Fri, 27 Aug 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Need Help Please - Performing same action on multiple controls

2. Help! - Action cancelled by associated object

3. HELP: action cancelled by associated object!

4. Action Cancelled.................Please help

5. VBA help window: Multiple windows/tabs, bookmarks, bookmarks/history pane

6. Open Action Cancelled

7. Err # 3426 Action Cancelled by an associated object

8. (Err 3426) This Action Was Cancelled By An Associated Object

9. Open report action was cancelled

10. action cancelled by an associated object

11. Run-time error '524': This action was cancelled by an associated object

12. Action Cancelled by an associated object - ?

 

 
Powered by phpBB® Forum Software