I have two forms and tables(New Deliveries Summary and SA-M 1013) with general information on them regarding aircraft (Registration#, Line #, Serial #). New Deliveries is the master reference sheet where I've inputted that general data, while SA-M 1013 has additional details. I've created a relationship between them with a ForumulaURL button in New Deliveries Table which I click and auto populates SA-M 1013 with the general information (Registration #, Line #, Serial Number). I am able to save form SA-M 1013, and the record appears on the table.
Now I 'm on the the New Deliveries Table and wish to edit the respective SA-M 1013 so I click the button, add the date, hit save, and it creates a new entry rather than editing the original entry. Is there a way to make the button edit the original first entry rather than create a new one?
While you did not post the formula for the button, I am assuming that it was the Generic Add Child Record button that the system created for you when you made the Relationship.
The system also would have created a report Link field on the left side of that Relationship, probably called SA-M 1013. if you put that one the parent main form New Deliveries. Then, in form properties set that field to show the child records directly on the form and setup a rpeort to use for that purpose on that field. Then when you look at any New Delivery record you will see the aircraft and all its details and can edit any of those detail records.
I've been able to create a button with New 1013 and a button for Edit 1013. The new button creates a new 1013 for a particular registration(5654), the edit can edit a 1013 for that same registration(5654). The edit button is a report link like you mentioned which ties the registration numbers on the New Deliveries Table to the SA-M 1013 table.
The only issue I have is that I can still create multiple 1013's for the same registration. Is there a way to hide or prevent creating a new 1013 for a registration if there is already one built?
Then in the button that you nhave now to ADD a SA-M 1013, wrap it like this
IF([# of SA-M 1013]=0,
urlroot() "db/" etc ......... )
The button will be blank if there is aleady a child record.
IF([# of SA-M 1013]=0, Create New Record, Edit Existing Record). This way I would only need one button to create or edit.
The current formula I have can create a new record but when I try to edit an existing record I get an error that the SA-M 1013 does not exist. Below is my formula.
If([# of 1013s]=0, URLRoot() & "db/" & [_DBID_SA_M_1016] & "?a=API_GenAddRecordForm&_fid_96=" & URLEncode ([Record ID#])& "&z=" & Rurl(), URLRoot() & "db/" & [_DBID_SA_M_1016] &"?a=er&rid="&[Record ID#]&"&dfid=96")
If([# of 1013s]=0,
URLRoot() & "db/" & [_DBID_SA_M_1016] & "?a=API_GenAddRecordForm&_fid_96=" & URLEncode ([Record ID#])& "&z=" & Rurl(),
URLRoot() & "db/" & [_DBID_SA_M_1016] &"?a=er&rid=" & [Maximum Record ID# of SA-M 1013 records])