I have a Numeric field in a table. the field named "Pr330USD" in a form, control source of a textbox named "PrEvFees" has been linked to that field.
I have also two buttons named:
OpenReportFRR
OpenFRRDraft
for opening two different Reports.
I wrote below codes aforementioned buttons:
Private Sub PrEvFees_BeforeUpdate(Cancel As Integer)
If Me.PrEvFees.Value >= 300 Then
OpenReportFRR.Enabled = True
OpenFRRDraft.Enabled = False
Else
OpenReportFRR.Enabled = False
OpenFRRDraft.Enabled = True
End If
DoCmd.Save
DoCmd.RefreshRecord
End Sub
Problems are: After insert an amount (less than 300 USD or above) the buttons doesn't change their situations and also Refresh command doesn't work (I have on the line included "DoCmd.RefreshRecord" a yellow alert).
any idea is thanks full.
BeforeUpdateevent is called before an update is made to an existing record that is loaded in the form. However you said after insert an amount is it a new record or an already existing one?