Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Data Entry Form Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rmichaux - 14 Apr 2008 13:00 GMT
Made a table and made a form.  Is it possible to enter information into a
form and use a command/control button for the information to "post" to the
table?  I notice that the field is updated each time a user tabs or moves to
the next field in the form.  I need to know what type of controls I can put
in place which will allow confirmation of all the information prior to it
being entered into the table.
Signature

rmichaux

boblarson - 14 Apr 2008 20:52 GMT
Actually, the data is updated when a user moves to another record (not when
you move from control to control, unless you have code to save the record in
one of the Lost Focus, After Update, etc. events of the control).  

You can use the form's BEFORE UPDATE event to cancel the update if you wish,
or have a command button which saves the record.

This is sample code:

Private Sub Form_BeforeUpdate(Cancel As Integer)

If Len(Nz(Me.txtSampleField,””) & “”) = 0 Then
If MsgBox("You must enter a value before continuing." & _
“Would you like to continue with this record?”, vbYesNo + vbQuestion,
"Sample Company, Inc.") = vbYes Then
       Cancel = True
       Me.txtSampleField.SetFocus
Else
        Cancel = True
        Me.Undo
End If
End If  
End Sub

Signature

Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________

> Made a table and made a form.  Is it possible to enter information into a
> form and use a command/control button for the information to "post" to the
> table?  I notice that the field is updated each time a user tabs or moves to
> the next field in the form.  I need to know what type of controls I can put
> in place which will allow confirmation of all the information prior to it
> being entered into the table.
rmichaux - 15 Apr 2008 12:59 GMT
That looks like Visual Basic line code, correct?  I am not that advanced and
have used the wizards to create the table and form.  Is there a way to
see/access the line code?  
rmichaux

> Actually, the data is updated when a user moves to another record (not when
> you move from control to control, unless you have code to save the record in
[quoted text clipped - 26 lines]
> > in place which will allow confirmation of all the information prior to it
> > being entered into the table.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.