G
Guest
Hello,
I have the strangest thing happening on a Command Button on a Form to open a
new Record. Here's the code:
Private Sub CommandOpenNewRecord_Click()
DoCmd.OpenForm "FCycChemistry", acNormal
DoCmd.GoToRecord acDataForm, "FCycChemistry", acNewRec
DoCmd.GoToControl "cyclenum"
End Sub
It works great, except there is other code that 'grays out' some fields if a
'Not Done' field is checked. For those fields on the form that were 'greyed
out' because the 'Not Done' field was checked, they show up as 'greyed out'
on the New Record. Here's an example of the 'grey out if true' code:
Private Sub creat_nd_AfterUpdate()
Dim blnEnable As Boolean
blnEnable = (Me.creat_nd.Value <> True)
Me.creat_u.Enabled = blnEnable
Me.creat.Enabled = blnEnable
End Sub
Is there something that needs to be 'cleared out' (some sort of cache,
maybe?) so that the new record doesn't automatically show fields greyed out?
Thanks.
I have the strangest thing happening on a Command Button on a Form to open a
new Record. Here's the code:
Private Sub CommandOpenNewRecord_Click()
DoCmd.OpenForm "FCycChemistry", acNormal
DoCmd.GoToRecord acDataForm, "FCycChemistry", acNewRec
DoCmd.GoToControl "cyclenum"
End Sub
It works great, except there is other code that 'grays out' some fields if a
'Not Done' field is checked. For those fields on the form that were 'greyed
out' because the 'Not Done' field was checked, they show up as 'greyed out'
on the New Record. Here's an example of the 'grey out if true' code:
Private Sub creat_nd_AfterUpdate()
Dim blnEnable As Boolean
blnEnable = (Me.creat_nd.Value <> True)
Me.creat_u.Enabled = blnEnable
Me.creat.Enabled = blnEnable
End Sub
Is there something that needs to be 'cleared out' (some sort of cache,
maybe?) so that the new record doesn't automatically show fields greyed out?
Thanks.