My project has a form with tabs, each tab displaying data from a different table based on the current record (I will call the main form's record the client) selected in the main form. If there is data present in the child table associated with that client, then show the data. If there isn't, I have a text field in my form header to say there are no records, with a link to open up a form for adding data to said child table. The form header also contains column headers for my continuous forms.
Now, if on the child form, I have Allow Additions turned off, then if the child table is empty for that client, it shows no data and the form_current or form_load methods do not seem to run, which is where I had code for hiding the column headers and unhiding my "No records" status/header text box, and vice-versa if there is data in the child form. If I turn Allow Additions on, then my code runs to hide the columns and show the status text box, but when there is data available in the table it shows the "new row" at the end of my results. I do not want the new row there.
So I can either turn on Allow Additions, have my code work, and it shows an extra new row, or I can turn off Allow Additions, my code breaks, but I don't have the extra new.
I tried to do this:
If Me.NewRecord Then
Me.field1.Visible = False
End If
but this produces undesired results; it doesn't hide the new row until I select it, then it hides all fields. I know that is how it should work, its just not the result I want .