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

  • Thread starter Eve via AccessMonster.com
  • Start date
E

Eve via AccessMonster.com

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?
 
S

Scott McDaniel

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
 
E

Eve via AccessMonster.com

No, I tried that first and it didnt help.

Scott said:
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
 
J

John W. Vinson

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]
 
E

Eve via AccessMonster.com

The changes aren't saving in the query either.
What's the form's Recordsource? Does it have any VBA code attached?

John W. Vinson [MVP]
 
J

John W. Vinson

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]
 
E

Eve via AccessMonster.com

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
 
J

John W. Vinson

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]
 
E

Eve via AccessMonster.com

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.

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]
 
Top