
Originally Posted by
June7
Do you mean the form named ContactDetails? That macro is not a data macro so it works fine in split db.
The ContactCard form that has the Comments as a subsubform is odd. Never seen this. The Comments subsubform container has a report as SourceObject. Reports cannot be used to enter data so the developer created a textbox and a button for entry of comments then refreshes the report so the new comment will display. I have no idea why this design was chosen. Maybe the developer just like the way the report looked on the form and/or didn't want user to have to scroll down to new record row for adding comments also maybe didn't want to allow edit of comments after saved.
Options are:
1. Change the SourceObject property to Comments table. Delete the comment textbox and button. You can set a DefaultValue of Now() for the CommentDate field.
2. Modify code for the Save Comment button.
I use VBA which means selecting [Event Procedure] in the Click event property, click the ellipses (...) to go to the VBA editor and type code:
CurrentDb.Execute "INSERT INTO Comments(CommentDate, Comment, ContactID) VALUES(#" & Now() & "#, '" & Me.txtAddComment & "', " & Me!ID)
Macro equivalent would probably require creating an UPDATE query object that the macro would then execute with OpenQuery method.
Both will require a refresh of the subsubform.
Do you know how to create and edit macros? Access Help has guidelines. That's where I went to figure out the data macro.