• AllowEdits fails to work properly (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » AllowEdits fails to work properly (2000)

    Author
    Topic
    #372976

    OK, here’s another question today… I am setting the AllowEdits property of my form to NO in the OnCurrent property, so users can not change an existing record. When I move to a record and try to change the fields it seems to work until I move into and then out of my ‘Amount’ field. I have two events in the Amount field:

    LOSTFOCUS
    Private Sub txtAmount_LostFocus()
    Me.txtDr_Cr.SetFocus
    End Sub

    KEYPRESS
    Private Sub txtAmount_KeyPress(KeyAscii As Integer)
    Select Case KeyAscii
    Case 8, 46, 48 To 57 ‘Numbers (48-57), Backspace(8), – Sign(45), Decimal(46)
    KeyAscii = KeyAscii
    Case Else
    ‘Ignore the rest
    KeyAscii = 0
    End Select

    End Sub

    I have used the utility “Find and Replace” to ensure that Allow Edits does not exist anywhere else in the database. Any ideas about why my form allows changes when set to not allow edits?

    Thanks!
    Randy

    Viewing 1 reply thread
    Author
    Replies
    • #597917

      Why not just set the AllowEdits property to No in your property sheet?

    • #597971

      There have been a number of threads on AllowEdits problems. Try a Lounge Search on AllowEdits for a listing. Here’s one that might help. There is also a known problem with AllowEdits when you set the value of a control programmatically. For more information on that, take a look at MSKB Q167420.

    Viewing 1 reply thread
    Reply To: AllowEdits fails to work properly (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: