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 / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Form allows changes to data but doesn't save or move to next record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eve - 01 May 2007 22:18 GMT
The form opens with the first record.  You can then scroll through the
records or add a new record.  However if you change any data the record locks.
You can not go to next record and your change is not saved when you close the
form.  There is no error message.  What's going on?
Scott McDaniel - 01 May 2007 22:36 GMT
>The form opens with the first record.  You can then scroll through the
>records or add a new record.  However if you change any data the record locks.
>You can not go to next record and your change is not saved when you close the
>form.  There is no error message.  What's going on?

Anytime odd behavior like this occurs, you should try a Compact and Repair (Tools - Database Utilities - Compact and
Repair, if using Access 2000+). Make a COPY of your database first, of course, then post back here if that doesn't fix
the problem.

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
Eve - 01 May 2007 22:49 GMT
No, I tried that first and it didnt help.

>>The form opens with the first record.  You can then scroll through the
>>records or add a new record.  However if you change any data the record locks.
[quoted text clipped - 8 lines]
>scott@takemeout_infotrakker.com
>www.infotrakker.com
John W. Vinson - 01 May 2007 23:16 GMT
>The form opens with the first record.  You can then scroll through the
>records or add a new record.  However if you change any data the record locks.
>You can not go to next record and your change is not saved when you close the
>form.  There is no error message.  What's going on?

What's the form's Recordsource? Does it have any VBA code attached?

            John W. Vinson [MVP]
Eve - 01 May 2007 23:28 GMT
The record source is a query.

>>The form opens with the first record.  You can then scroll through the
>>records or add a new record.  However if you change any data the record locks.
[quoted text clipped - 4 lines]
>
>             John W. Vinson [MVP]
Eve - 01 May 2007 23:34 GMT
The changes aren't saving in the query either.

>>The form opens with the first record.  You can then scroll through the
>>records or add a new record.  However if you change any data the record locks.
[quoted text clipped - 4 lines]
>
>             John W. Vinson [MVP]
Eve - 02 May 2007 00:34 GMT
The query is fixed and saves the changes in the form but still won't go to
next record in the form.

>The changes aren't saving in the query either.
>
[quoted text clipped - 3 lines]
>>
>>             John W. Vinson [MVP]
John W. Vinson - 02 May 2007 06:13 GMT
>The query is fixed and saves the changes in the form but still won't go to
>next record in the form.

You're not being much help here, Eve. I cannot see your computer. I don't know
what the query is (you haven't posted the SQL of the query or even anything
about it other than that it is a query). You haven't answered my question
about code.

I'd like to be able to help you but I cannot, with what you're posting.

            John W. Vinson [MVP]
Eve - 02 May 2007 13:09 GMT
The query is working fine, here is the code and the problem seems related to
the uddate feature, if I take it out it works.

Private Sub Form_AfterUpdate()
Me.Update = Format(Now, "m/d/yy hh:nn")
End Sub

Private Sub Form_Close()
DoCmd.Minimize
End Sub

Private Sub Form_Current()
Me.[OpenedDate].Locked = Not Me.NewRecord
Me.[DueDate].Locked = Not Me.NewRecord
End Sub

Private Sub Form_Load()
   If Me.OpenArgs = "GotoNew" And Not IsNull(Me![SubjectTypeID]) Then
       DoCmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70
   End If
End Sub

>>The query is fixed and saves the changes in the form but still won't go to
>>next record in the form.
[quoted text clipped - 7 lines]
>
>             John W. Vinson [MVP]
John W. Vinson - 02 May 2007 16:11 GMT
>The query is working fine, here is the code and the problem seems related to
>the uddate feature, if I take it out it works.
>
>Private Sub Form_AfterUpdate()
>Me.Update = Format(Now, "m/d/yy hh:nn")
>End Sub

Update is ANOTHER reserved word. Me.Update is an operation to update the
form's recordsource, I would guess - though I don't expect it would actually
work.

You may want to routinely enclose ALL control and fieldnames in square
brackets, since you seem to have a penchant for using reserved words as
fieldnames! Does

Me.[Update] = Now

work? (Note that if Update is a date/time field - as it should be for
searching and sorting - the Format is unnecessary).

            John W. Vinson [MVP]
Eve - 02 May 2007 21:39 GMT
I moved it from on update to on dirty and all is well now.  Thanks!

>>The query is working fine, here is the code and the problem seems related to
>>the uddate feature, if I take it out it works.
[quoted text clipped - 17 lines]
>
>             John W. Vinson [MVP]
 
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



©2009 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.