I want a form to be openable from various other forms, and have used the following code to pass the ID from the original form to the opened one:
I then want some controls on the opened form to be visible whether a certain condition is met, and that's a dlookup on some table with the ID I pass to the form.
It seems though that I have to check this condition on the several original forms while I'd like to code it just once on the form-to-be-opened.
Is there a way to do it?
Code:
DoCmd.OpenForm "frmAggOrdini", acNormal
With Forms!frmAggOrdini
.DataEntry = True
.cboCliente = Me.frmDettaglioClienti.Form.IDCliente
End With
I then want some controls on the opened form to be visible whether a certain condition is met, and that's a dlookup on some table with the ID I pass to the form.
It seems though that I have to check this condition on the several original forms while I'd like to code it just once on the form-to-be-opened.
Is there a way to do it?