[AccessD] A Dot Bang nightmare (WAS Access97 on W2000 crashes)

Andy Lacey andy at minstersystems.co.uk
Fri Jan 13 12:31:11 CST 2006


Thanks Shamil.

> Is that frm.fld a checkbox?
No, you'll see from my post that fld doesn't appear on the form at all, only
on the underlying recordsource. There is no control.

-- Andy Lacey
http://www.minstersystems.co.uk 

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> Shamil Salakhetdinov
> Sent: 13 January 2006 17:42
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] A Dot Bang nightmare (WAS Access97 on 
> W2000 crashes)
> 
> 
> Congratulations, Andy!
> 
> > although even you might be taken aback by a seemingly
> > trivial coding error that 'works' itself but causes such collateral 
> > damage elsewhere.
> No, I wouldn't :)
> I did fix many issues like that - didn'ty I say there is no 
> miracles in software programming and that you will sleep well 
> only when you find the real cause of your trouble?
> 
> I have had similar error(s) in the past with legacy code 
> coming from MS Access 2.0 where dot was allowed. But in your 
> case I didn't expect your code has MS Access 2.0 roots.
> 
> Of course I should have recommend you to check dot vs. bang 
> first of all. Sorry I didn't do that.
> 
> But I did say you to analize your code for your wizard when 
> you wrote that you get wizard steps automated. And to take 
> close attention on your using default properties.
> 
> > this one was
> > frm.fld = rst!fld
> This is exactly the case of "default properties + dot vs. 
> bang nightmare". And I do remember there was a KB article or 
> something like that in the past on this subject. I did try to 
> find it for you but failed Then I forgot to recommend to 
> check you first of all dot vs. bang code because of other 
> work. My fault...
> 
> Is that frm.fld a checkbox?
> 
> Have a nice weekend and a good night sleep at last!
> 
> Shamil
> 
> ----- Original Message ----- 
> From: "Andy Lacey" <andy at minstersystems.co.uk>
> To: "Access Developers discussion and problem solving" 
> <accessd at databaseadvisors.com>
> Sent: Friday, January 13, 2006 6:54 PM
> Subject: [AccessD] A Dot Bang nightmare (WAS Access97 on 
> W2000 crashes)
> 
> 
> > Well at long last I've cracked what was causing my strange crashes 
> > under W2000. For the sake of the archives, and anyone else who 
> > encounters this nightmare, I will tell all.
> >
> > We all know that you can refer to controls on forms as form!ctl  or 
> > form.ctl. We can argue about the rights and wrongs of the second of 
> > those but we know you can do it. This is not about that argument. 
> > What, though,
> if
> > you have a field in a form's underlying recordsource but not on the 
> > form?
> If
> > you referenced that you'd think that you must use the ! 
> form wouldn't 
> > you, as there is no control? I would. But what if you inadvertently 
> > use the . form? What, in particular, if you pass the form as a 
> > parameter to a
> function
> > and make that mistake inside the function (thereby giving 
> the compiler 
> > no chance of picking it up as an error)? Well maybe 
> nothing...but then 
> > again maybe programming havoc.
> >
> > W98 seems to be extremely tolerant of this mistake. It 
> treats it as if
> you'd
> > coded ! after all. You will be none the wiser about your slip-up. 
> > Moving
> the
> > same MDB to W2000 or XP was a different story. What 
> happened there was
> that
> > once the offending line had been executed the system would 
> inevitably
> crash,
> > at some point, either with a non-specific "Msaccess.exe has 
> generated
> errors
> > and will be closed by Windows" error, or a GPF or a "Tried 
> to write to 
> > memory location xyz and you're not flipping allowed to" 
> error. But the 
> > 'beauty' of this was that it *never* crashed on the line 
> which caused 
> > the errors, just at seemingly random points thereafter. So standard 
> > debugging methods were useless. As fast as I put traps in 
> one part of 
> > the system it would crash somewhere else entirely. So I'd switch my 
> > attention to there, and it blazes through there without a 
> hitch and a 
> > couple of minutes later GPFs somewhere else. I was tearing my hair 
> > out. In the end, and it's taken all week, I took a 
> different approach. 
> > I said, if I quit this area of code after it's executed 1 
> line, do I 
> > get any crashes? Answer, no. If I allow
> it
> > to go to the end do I get crashes, answer yes. So, if I 
> quit the code 
> > half way through, do I get crashes? If yes the code before the 
> > half-way point
> is
> > causing it, if no it's between half-way and the end. You get the 
> > picture.
> In
> > that way I chopped and chopped and, a long, long time 
> later, got down 
> > to
> the
> > function and then the line that made the difference. Not, remember, 
> > that executing the line crashed, but that executing the line caused 
> > the system
> to
> > crash somewhere else soon. And that's when I saw that whilst the
> surrounding
> > lines were of the format
> >
> > frm!fld = rst!fld
> >
> > this one was
> >
> > frm.fld = rst!fld
> >
> > So I changed . to ! and lo and behold no more crashes.
> >
> > And I can only talk about A97, as I can't test my app on anything 
> > else,
> and
> > I know it's not even a universal problem in A97 as I just tried to 
> > create
> a
> > little MDB to demo the problem, and it fails to crash. So 
> there's no 
> > consistency in any of this but there is a huge problem there 
> > somewhere,
> cos
> > when it does hit it's a terror. It's perhaps the closest 
> I've come in 
> > 30 years of programming to saying I can't solve this 
> because it defies 
> > logic. But still, it's solved now, just in time for the week-end so 
> > I'll be
> having
> > a big drink tonight.
> >
> > Thanks to all who responded to my plea earlier in the week. 
> I was on 
> > the wrong track with DLL's, although I think I can be forgiven for 
> > thinking along those lines, and it was Shamil who urged me 
> to focus on 
> > code. You
> were
> > right as ever Shamil, although even you might be taken aback by a
> seemingly
> > trivial coding error that 'works' itself but causes such collateral 
> > damage elsewhere.
> >
> > Have a good week-end all. I know I will.
> >
> > --
> > Andy Lacey
> > http://www.minstersystems.co.uk
> >
> >
> > ________________________________________________
> > Message sent using UebiMiau 2.7.2
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list