On Current for embedded forms

Sorry, you must have been editing to add the problem after I downloaded the file. In the current event, each of your tests begins with:

If Not Me.NewRecord...

So you never tell it what to do if it is a new record.
 
Sorry, you must have been editing to add the problem after I downloaded the file. In the current event, each of your tests begins with:

If Not Me.NewRecord...

So you never tell it what to do if it is a new record.

In the main form frmProject I do have the extra code in on the On Current just not on the frmInvoice:

Code:
If Me!Invoice.Form.NewRecord Then
Me!Invoice.Form!cmdPlanned.Visible = True
Me!Invoice.Form!cmdClearPlanned.Visible = True
Me!Invoice.Form![Planned Invoice Date].Visible = True
Me!Invoice.Form!cmdActual.Visible = False
Me!Invoice.Form!cmdClearActual.Visible = False
Me!Invoice.Form![Actual Invoice Date].Visible = False
Me!Invoice.Form![invoice number].Visible = False
Me!Invoice.Form!chkPaid.Visible = False
Me!Invoice.Form![Payment Received Date].Visible = False
Me!Invoice.Form!cmdPayment.Visible = False
Me!Invoice.Form!cmdClearPayment.Visible = False
End If

But it still doesn't seem to work...
 
I've just put that if me.newrecord code into frmInvoice as well and now it works!! I don't understand I thought that because it was embedded I would control it from the master form...

Why did i need the code in the subform as well?
 
The current event of the main form does not fire when you change records on the subform. It only fires when you change records on the main form. The proper place for the code in this case is the subform.
 
Ahhh...

Thank you ever so much for your help!!

:)
 

Users who are viewing this thread

Back
Top Bottom