Open form within form

S

Sash

I've added a button on a continuous form to open a notes form with the
following code. I have successfully done this in the past, but am now
getting the following error message:

"The expression On Click you entered as the event property setting produced
the following error: A problem occurred while Microsoft Office Access was
communicationg with the OLE server or ActiveX Control."

Of course, I need to use the database tomorrow. Any ideas?

Thanks greatly,
Sash


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Note"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
S

Sash

Could it be that my database was corrupt? I imported everything into a new
database (after trying everything else) and it functions just fine.
 
M

Marshall Barton

Sounds like it probably was.

One way that can often corrupt the code in a project is to
edit a form's code when the form is open in any view except
design view. Always switch to design view before making any
changes and keep good backups.
--
Marsh
MVP [MS Access]

Could it be that my database was corrupt? I imported everything into a new
database (after trying everything else) and it functions just fine.

Sash said:
I've added a button on a continuous form to open a notes form with the
following code. I have successfully done this in the past, but am now
getting the following error message:

"The expression On Click you entered as the event property setting produced
the following error: A problem occurred while Microsoft Office Access was
communicationg with the OLE server or ActiveX Control."

Of course, I need to use the database tomorrow. Any ideas?

Thanks greatly,
Sash


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Note"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Top