![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, New form development for me. I am using the default P9 button code for adding a new record in a child table. If the master record already has a detail record in the child table this goes fine, but if the master record has no such record then the following section of code breaks me out of inserting a new record. ;// Move to the end of the table ;// if NOT active.end() then message(errorCode()) ;// my line to get the 8705 errorShow() ;// custom error handling calls should go here return endIf errorShow() gives the message "At beginning of table". Obviously we are "NOT active.end()" 'ing. The child table is represented on the form as a 1x1 MRO and the master table as a tableframe. What can be causing this, am I doing something wrong in principle here? Thanks for any comments Anne ----- Anne Wainwright Please reply to group |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Why test for end anyway? You can just insertrecord and test that (if not insertrecord() then). Denn Santoro President Resource Development Associates http://www.RDAWorldWide.Com Offices in the United States and Germany Providing solutions to health care, business, governments and non-profits since 1982 |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Anne, Just put in a check to active.isEmpty() before doing the active.AtEnd(). If it is empty, then you are already at the last (and first) row once you insert a row. HTH, Jim Moseley |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |