Subform new record conditioning

GordonR

Registered User.
Local time
Today, 19:47
Joined
Aug 19, 2003
Messages
29
Hi!

I have a subform (continuous forms) that includes a command button to perform a task for each of the individual records. However, I also get it on the 'new record' at the bottom, which is not appropriate.
I would still like the user to have the opportunity to add new records so I dont want to set the form to 'allow additions' = no.
I have tried to add a bit of code:
Private Sub Form_Current()
If Forms![Supplier Prices Subform].NewRecord = True Then
Forms![Supplier Prices Subform]![Command16].Visible = 0
Else
Forms![Supplier Prices Subform]![Command16].Visible = 1
End If
End Sub
and adding it as an 'on current' event but this therefore occurs at the form level and turns them all on or off.

TIA !!
 
Hi,

That's right, because there's only one instance of the button you want to hide, but it's shown for each record.

You can find some things to do this on www.lebans.com

Good luck,
Bert
 

Users who are viewing this thread

Back
Top Bottom