Can't edit via controls

B

Bird Byte

I inherited an Access 2003 form that one day allowed edits but the next day
did not, and I can't figure out what caused this. The forms were originally
written in 2000, but they have been working fine under 2003 (until yesterday).

Form 1's record source is a query that populates text boxes. A filter is
applied in form 1 to find a set of records. Once a record is selected, a
button is pressed that opens form 2. When form 2 opens, data gets passed from
the record selected on form 1:

DoCmd.OpenForm "SlideData", acNormal, , "[SlideLabel] = '" & [Label on
Slide] & "'", , , [SpecimenID]

When form 2 opens, it also has a query that serves as a record source, and
contains controls (text boxes mostly). Some of the boxes are already
populated with some of the data from the selected record. Other controls are
to be filled in. Form 2 also has a button that creates more records (a
continuous form):

Private Sub cmdNewSlide_Click()
On Error GoTo Err_cmdNewSlide_Click

Debug.Print "me.openargs is " & Me.OpenArgs
Debug.Print "me.specimentID is " & Me.SpecimenID


Dim db As Database
Dim rs As Recordset
Dim sql As String
Dim saveID As Long

Set db = CurrentDb
sql = "SELECT * FROM Slide"
Set rs = db.OpenRecordset(sql)

rs.AddNew 'create record
rs!SpecimenID = Me.OpenArgs
rs.Update
rs.Bookmark = rs.LastModified
saveID = rs!SpecimenID

rs.Close
Set rs = Nothing
db.Close
Set db = Nothing

Me.Requery
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Me.Requery

Exit_cmdNewSlide_Click:
Exit Sub

Err_cmdNewSlide_Click:
MsgBox Err.Description
Resume Exit_cmdNewSlide_Click

End Sub

Suddenly, form 2 will not accept any edits. The code or forms haven't
changed, which makes me think I should look elsewhere for the problem (why
would it work one day and not the next), but where I'm not sure.

Any help or ideas are greatly appreciated.
 
B

Bird Byte

Thanks. I'm not sure exactly which hotfix you're referring to, but I did
download and install Office2003-kb945674-glb.exe. No change. Is there a
different one I should check for?

Do you think I am looking at re-creating the form?

Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top