So I fixed it - my solution was literally just to paste the entire "if ProtocolHomeTabs.ActivePage" ..... routine into the code a second time. As in, that part of the code is repeated twice. Seemed to fix the problem entirely, but just out of curiosity I commented out the second occurrence and tried Zvoni's suggestion of 'DBGrid.DataSource.DataSet.Refresh' - and it still worked. So I commented out the refresh statement and guess what .... STILL WORKED. WHAT THE? Not the first time I've had weird things like that happen and there is at least one other section of code in my program where I need to repeat the code or it doesn't work. Anyway, it's working - nobody breathe!
So I think I'm very nearly near the end of this saga, and then I'll go away and stop annoying you all for a few months until I hit my next violence-inducing catastrophe. I just have two more issues.
1. Is there a way to get the DBGrid to scroll to the bottom and select the new entry?
2. Speaking of scrolling, I have the ScrollBars property set to SSVertical. Doesn't work. Is there a way to get Scrollbars to actually appear on the DBGrid?
If not, my other option is ....
3. Is there a way to fix the previous (MEMO) issue I had when using a DBLookupListBox ? I can get it to connect to the database no problem, so it seems to be a viable option, but all the data appears as (MEMO). There's no dgDisplaymemotext flag in the inspector like there is with DBGrid.
Thanks everyone!