Unbound Data Entry Form

cagay

Registered User.
Local time
Today, 08:26
Joined
Aug 14, 2005
Messages
12
Is anyone there who can show me a db sample of unbound data entry form. I want to control the builtin auto save of Access, because sometimes I don't want to save the data of my form..

Thanks,
cagay
 
cagay said:
Is anyone there who can show me a db sample of unbound data entry form. I want to control the builtin auto save of Access, because sometimes I don't want to save the data of my form..

Thanks,
cagay


Try this one, I have used this a few times. Its not perfect but will help you get started!
 

Attachments

cagay said:
I want to control the builtin auto save of Access, because sometimes I don't want to save the data of my form.

You can use the form's Before_Update() event to prevent dat being saved; there's absolutely no need for unbound data entry forms.
 
Form - Before_Update

SJ McAbney said:
You can use the form's Before_Update() event to prevent dat being saved; there's absolutely no need for unbound data entry forms.

Hi SJ McAbney,

Can you show me the right code, I don't now much yet in code..

Thanks for your time..
cagay
 
Thank you mousemat,

I will try to adopt your approach..
 
BeforeUpdate Event

Pat Hartman said:
As has already been suggested - you just need to use the FORM's BeforeUpdate event properly.


Pat,

My Access level is very beginner, infact this is my very first DB to make. Can you guide me, what is the code to be use in the "BeforeUpdate" of my form!..

Thanks,
cagay
 
Code:
Private Sub Form_BeforeUpdate()
    If MsgBox("Do you wish to save the changes?", vbQuestion+vbYesNo,"Save?") = vbNo Then
        Me.Undo
    End If
End Sub
 
Well, thank you all guys..

Been trying the code of MJ McAbney, it also tiggers when I click my "AddRecord" button..maybe because it is "beforeupdate" event..I guess I don't need a button, just make my form as data entry = yes..
 
Pat Hartman said:
Sample edit code might be:

Code:
If IsNull(Me.SomeField) Then
    Msgbox "SomeField is null.  Please enter a value", vbOKOnly
    Me.SomeField.SetFocus
    Cancel = True
End If
If Me.SomeField > 55 And Me.SomeOtherField > 22 Then
Else
    Msgbox "SomeField and/or SomeOtherField are out of range.  Please fix.",vbOKONLY
    Cancel = True
    Me.SomeField.SetFocus
End If


Hello Pat,
I just want to make some clarification, "Me.SomeField", if I will replace this to one of my table field, how about the other fields. Also I think this code is useful on "required" field..

I just want a code to put behind my "SAVE" button to either save the record/data or no and close the form..

cagay,
 

Users who are viewing this thread

Back
Top Bottom