July 23, 2018 at 1:28 am #3572jaszczakParticipant
On some of my forms I have detail blocks that are linked to a field in a table that often contains .nul in a lot of the records. When I click to create a new record from such a form the new record of course has .nul
initially in its linked field so the detail block takes a long time to populate finding all of the .nul records. I find that I often don’t realize the program is busy while doing this and may start entering
data for new record when all of a sudden the detail block finishes updating and the entries I made by typing disappear. I’d like to find a way to have the program tell me its busy but I can’t find a workable place
to turn on the busy cursor (like in the prepform function or the initialize function I run when
onnewrecord is clicked on the form); or find a way to right away set a desired value to the linked field
before it starts looking up the .nul values for the detail block. Perhaps there is another way?
JohnAugust 7, 2018 at 10:26 pm #3576JD KromkowskiParticipant
As a design principle, I am not quite understanding why a linking field that has .nul value should ever be chosen as a linking field. A field that is linking two tables should be a field (in my book) that MUST have non – .nul data.
I use quite a few detailblocks. The first value in a child record is always going to be the linked value (which is programmatically assigned) and I used a dialog like a pop-up to create the child record. The act of closing the dialog always saves (well sometimes it could delete) the child record. So there is never a limbo situation like you are describing.
JDKAugust 8, 2018 at 3:27 am #3577jaszczakParticipant
JDK thanks for your perspective on this. Perhaps then this is poor design of the table of child records then on my part. My primary objects are mineral specimens. I have another table of all of their different USES.
Sometimes I photograph them, in which case I assign a link number for the photo and associate data details. In some cases I might loan them and assign a loan number and enter associated data for the loan. If I open my photo form the detail block will link the photo number for the records I want to see, but all of the loan uses would have .nul usually in the linked photo number. On the converse if I want to see loans details I open
a loan form and the detail block finds linked loan numbers and I don’t see the .nul photo entries. Perhaps the solution for me then is to split the USAGE table- separate PHOTO uses from separate LOAN uses. IF they
need to be linked I could assign a common USAGE number to both the split tables.August 10, 2018 at 3:26 pm #3578JD KromkowskiParticipant
It sounds like every specimen is the Parent/Master table. So I’d have a unique ID for every specimen (which you probably do.) So specimen table has unique SpecimenID
For your “pictures” you have a pictures table for each picture. Each record/picture as its unique ID (PictureId) AND it has a corresponding SpecimenID which is the link to the specimen table for a detailblock.
Then you have a loan table. Each loan has its unique ID LoanID field, but it will also have corresponding SpecimenID which links to the Specimen being loaned.
pictures (pictures of a particular specimen)
loans (loans of a particular specimen)
You obviously know your data better than I do, so I could be missing something about your needs.
- You must be logged in to reply to this topic.