Visible property???

Maxine1010

Registered User.
Local time
Today, 17:42
Joined
Jun 28, 2002
Messages
25
Hi,

I'm back again. I have managed to create code so that when a text box (Date) on a subform has text inputted, a command button is displayed on the main form. It works fine when going backwards and forwards through records but on opening an error message occurs saying

'Run time error 2455 - You entered an expression that has an invalid reference to the property form/ report'.

I think it may be conflicting with the 'On Open' macro but I haven't a clue......Please help.

The code I used for the visible property is as follows:

Private Sub Form_Current()
If IsNull(Forms![Main Form]![SubForm]![Date]) Then
Me.Image.Visible = False
Else
Me.Image.Visible = True
End If


All help and adviice much appreciated!
 
I figured it out - only took a full day but hey....

I was right, the code was conflicting with a macro I had in the 'OnOpen' event which opened a new record. If only I had realised this at 11am yesterday!!!

Thanks
 

Users who are viewing this thread

Back
Top Bottom