Thanks Tom, but that method is a bit of a compromise for me. I would still
prefer to able to check and uncheck the Check Box. My current method for
doing this is for the Check Box to be located on the Main Form and the
records I want to lock to be in a Sub Form.
I'm starting to wonder if Office XP SP3 is worth the effort. What I will do
now is reinstall Office XP without any Service Packs on the machine which
currently has SP3 and see if this solves the problem (I'm not entirely sure
if SP3 is the problem but I'm pretty sure it is since that's the only
difference I could find).
Hi Dave,
Oh, sorry, I didn't know you were using a check box on a main form to lock a
subform. After reviewing your initial post, I see that you did mention this.
I honestly don't think this is related to XP SP-3, but I don't know that for
sure. Give me a few minutes to check out some revised code, before you do the
re-install. I'll post back shortly.
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
> Thanks Tom, but that method is a bit of a compromise for me. I would still
> prefer to able to check and uncheck the Check Box. My current method for
[quoted text clipped - 6 lines]
> if SP3 is the problem but I'm pretty sure it is since that's the only
> difference I could find).
Tom Wickerath - 21 Apr 2008 06:51 GMT
Sorry for the delay. Got interrupted with a phone call....
Make the following change to the SetFormEdits procedure, where "Invoice
Item" is the name of the subform control. This may or may not be the same
name as the subform itself. It's important that you use the name of the
control that holds the subform. Leave the Form_Current and
Invoice_Check_AfterUpdate procedures as is. All code goes in your main form.
Private Sub SetFormEdits()
On Error GoTo ProcError
Dim ItemString As Form
Set ItemString = Me![Invoice Item].Form
With ItemString
.AllowEdits = Not Me.invoiced_check
.AllowDeletions = .AllowEdits
.AllowAdditions = .AllowEdits
End With
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure SetFormEdits..."
Resume ExitProc
End Sub
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
> Hi Dave,
>
[quoted text clipped - 21 lines]
> > if SP3 is the problem but I'm pretty sure it is since that's the only
> > difference I could find).