Microsoft Access
--
Questions
--
Followers
Top Experts
The main form is called fContacts and on it there are a number of tabs containing different subforms. One subform called fDonations works perfectly, but the last one I added fGrantApplications does not. As soon as I type an entry into the subform, I get an error
'A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.
Close the OLE server and restart it outside Microsoft Access. Then try the original operation again'.
Once I have cleared this error, i can continue to fill data into the subform, but as soon as I move off the subform I get another error
"You cannot add or change a record because a related record is required in table 'Contacts'"
The form fContacts has a a primary key contactid and the subforms have a foreign keys contactid which is linked in both cases. I cannot see why one subform should work, but not the other.
I am showing the contactid in a textbox on each subform and whereas the fDonations one changes when I move to another record in the main form, the one on the GrantApplication subform does not. I have had this problem for about a week now and am making no progress
HELP!!
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
This led to our creation of Total Access Components which is a set of 29 controls designed specificaly for Access (http://www.fmsinc.com/Micr
Unfortunately, it was not easy....especially if you're doing data binding.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Open any code module, click on Tools...References, remove your reference to Microsoft ActiveX Data Objects 2.1 Library, and replace it with a more respectable version (2.6 and above).
HTH
Try all the other suggestions first.
Then report back
Then try some of these common fixes, in order of "severity":
- Compile the code and run the Compact/Repair utility.
- Delete the offending control and reinsert a new one.
- Create a blank new database and impost all of the objects.
- Recreate the Form from scratch
JeffCoachman
the exact problem i dont know, but in those obscure occassions, like this one, all i did was:
application.SaveAsText acForm,"FormNameHere",curr
to both fContacts and fGrantApplication forms, then DELETE them from the mdb file, and then use:
application.LoadFromText acForm,"FormNameHere",curr
to re-build the forms from scratch, and voila! it fixed the error
as far as i remember the above (undocumented) commands are used internally for replication, but are for rebuilding forms that gone bad...
cheers.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I downloaded your database and resolved the problem by taking the steps outlined in my earlier post.
HTH.
application.SaveAsText acForm,"FormNameHere",curr
It sounds like a pretty useful technique for times like this
Have you tried replacing the referenced version of Microsoft ActiveX Data Objects 2.1 Library with something more recent?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.