Prevent Bound Form from updating records before clicking on Save button

Twinnie

New member
Local time
Today, 10:55
Joined
May 30, 2014
Messages
8
Hello,

I am working on a web database with a form which is bound to an underlying web table where the submissions occur.

My challenge is that the fields on the form get submitted to the table even before the submit button is clicked regardless of whether the form was completely filled.

My request is that I want the form to only submit to the submission table only when the submit button is clicked.

When I searched on the net, the only solutions I got are VBA written code but my web database cannot use VBA code.

VBA code:
Option Compare Database
Option Explicit

Private blnGood As Boolean

Private Sub cmdSave_Click()
blnGood = True
Call DoCmd.RunCommand(acCmdSaveRecord)
blnGood = False
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String

If Not blnGood Then
Cancel = True
strMsg = "Please use the Save button to save your changes," & _
vbNewLine & "or Escape to reset them."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
End Sub

Please assist with a data or table macro that can achieve something similar.
 
Hi Twinnie

I have not yet designed a web based database, but i have a couple of thoughts/suggestions that may be relevant.

I would ask, does the form NEED to be bound? If the forms purpose is data entry, could you not use an unbound form and run an update style query (or more likely a data macro) from the submit buttons OnClick event?
Failing that, could you not use a data entry table and run an append style query (or delete style query) from the submit buttons OnClick event?
 

Users who are viewing this thread

Back
Top Bottom