forms - passing parameter

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

I have a form, Form1, with two command buttons. Each
button opens a second form, Form2.

Command Button1 opens Form2 in add mode, Command Button2
opens Form2 in edit mode.

If data mode = acFormadd, the footer should be invisible.

On Form2, I am having trouble locating the parameter to
read to enable this condition.

I have unsuccessfully tried " if me.forms.allowadditions
= true ...."

What parameter should I should be calling on Form2 to
allow for this to happen.

Thanks.
 
JD said:
I have a form, Form1, with two command buttons. Each
button opens a second form, Form2.

Command Button1 opens Form2 in add mode, Command Button2
opens Form2 in edit mode.

If data mode = acFormadd, the footer should be invisible.

On Form2, I am having trouble locating the parameter to
read to enable this condition.

I have unsuccessfully tried " if me.forms.allowadditions
= true ...."

What parameter should I should be calling on Form2 to
allow for this to happen.

Thanks.

Put this in the OnCurrent event of Form2


If Me.AllowAdditions then
Me.FormFooter.Visible = False
Else
Me.FormFooter.Visible = True
End If

If that doesn't work you could try this in the OnClick event of Button1

DoCmd.OpenForm "Form2", acNormal, , , acFormAdd
[Forms]![Form2].FormFooter.Visible = False
[Forms]![Form2].FormFooter.refresh


and this for Button2 Onclick:

DoCmd.OpenForm "Form2", acNormal, , , acFormEdit
[Forms]![Form2].FormFooter.Visible = True
[Forms]![Form2].FormFooter.refresh



Have you tried a me.refresh
 
Back
Top