Open form within form

G

Guest

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
 
G

Guest

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

missinglinq via AccessMonster.com

If that worked, then yes, it sounds like corruption.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top