Then you need to look at using unbound forms (i.e. forms that have no
Recordsouce) and explicitly saving the data upon buttonclick. There really
is no way to tell Access to NOT save a bound form. Using unbound forms
removes a lot of the functionality that makes Access the useful tool that it
is, but it can be done.
When saving, open a recordset based on the table(s) where you wish the info
saved:
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT * FROM tblYourTable WHERE 1=0", currentproject.connection,
adOpenDynamic, adLockPessimistic
rst.AddNew
rst("Field1") = Me.ctlControl1
rst("Field2") = me.cboControl2.column(0)
etc
rst.Update
rst.close
Set rst = nothing
OR use an Insert query:
currentproject.connection.execute "INSERT INTO tblYourTables(Field1, Field2)
VALUES(Value1, VAlue2)
Brad said:
I'm using Access 2000. I have a form with textboxes, combo boxes..etc. The
user will populate the form using an Access Interface and I have a "OK"
button which I would like to be the final verification. If I just set the
control source property to a certain field, it populates the table as soon
as it loses focus. I would like to populate my fields using the click event
of the button..ex. something like Field = cboTest.Value etc...