Creating a new record entry in one DB from another DB

I have the following 2 databases each having a relation to the other pictured below.
(I hope the .png screen shots load)


When I make a new entry in the “New AP Purchases” db, the Email gets pulled from the “New AP Customer” without a problem. When a new value for Email gets entered into the Email field of the “New AP Purchases”it gets written back into the “New AP Purchases” without a problem. My issue/problem is how to create an entry in the “New AP Customer” db when no «CombinedName» is found when making an entry into “New AP Purchases”. Creating a new customer (one that will have a CombinedName field that is the same as the new entry in the “New AP Purchases” db. A button on the entry form that makes the following call
posttorelated “New AP Customer List”
does not seem to do anything.
My database design knowledge is sorely lacking here.

I think this paragraph from the posttorelated function will provide the answer you are looking for:

Note: If you want the posttorelated statement to add a new record like this, be sure to set the Append Non-matching Data option in the Datbase Options>Relations dialog panel. Otherwise the statement will simply stop with an error if no match is found. Or, you can build this option right into your code, like this:

posttorelated "HobbyShopCustomers","APPEND","yes"

You may wonder “why is this optional?” Well, in some circumstances you may not want it to add a new record in this situation.

Sorry to reply so late, but other projects jumped to the head of the line.
I fixed the “posttorelated” function, or so I thought.
Now, when I tab out of the «CombinedName» field while working in the “New AP Purchases” DB, I get the following alert.
image

From the relation dialogs above, you can see that contrary to what the alert says, “New AP Customer List” does have a relation back to “New AP Purchases”. I’m missing something but I don’t know what.
The «CombinedName» field in the “New AP Purchases” DB has the following formula:
?((FirstName="") AND (LastName=""),Company,FirstName+" "+LastName)

and it has the following code:
posttorelated “New AP Customer List”,“APPEND”,“yes”

I can post both DBs along with the 8 small DBs that open in secret.

At the time you posted those screen shots 9 days ago it would appear that you had the relation from New AP Customer List back to New AP Purchases, but apparently you don’t any longer. Maybe you did not save the databases after setting up the relations? Please check the relations panel again.

Life keeps getting in the way of replying quickly. Anyway.
I checked and I did save the databases after setting the relations, and I still get the alert and failure to post. I have attached screen shots of the relations dialogs for both DBs.


If you want to put these databases into a zip file and send them to me, I will investigate.

The 2 related files are:
New AP Customer List.pandb
New AP Purchases.pandb

Thes Ciphers file are used by some commands in the New AP Customer List file. It is possible that the whole problem is crappy DB design. If so, I need a tiny bit more info as to where I screwed up

(Attachment Sams AP files.zip is missing)

The second screenshot (of New AP Customer List) does not show a relation to a different database — it is referring to itself.

&%*$#@!!!
Retreating to my cave now.