Some time ago Steve Jorgenson, (I think it was he), wrote of possible
problems using the intellisense-friendly "Form_" syntax to refer to forms
and their controls. At the time I responded that I'd never seen any
problems - which was true until today.
Using Access XP on WinXP Pro with all service packs.
My code checks to see if a form, "frmMain", is dirty. So my options are::
a) If Form_frmMain.Di rty Then
b) If Forms("frmMain" ).Dirty Then
c) If Forms![frmMain].Dirty Then.
For some reason, using option a) above causes one of my combo boxes to lose
it's records. The combo box is populated, using a callback function, from a
sql server stored procedure. Several other combo boxes are unaffected. If I
requery the combo box I get my records back. The problem occurs whether or
not the form is actually dirty - simply the reference to Form_frmMain
apparently vaporizes the records.
At the risk of starting a syntax flame war I just thought I'd mention this
here and see if anyone has any comments.
Other than "well don't use a) then" :-).
problems using the intellisense-friendly "Form_" syntax to refer to forms
and their controls. At the time I responded that I'd never seen any
problems - which was true until today.
Using Access XP on WinXP Pro with all service packs.
My code checks to see if a form, "frmMain", is dirty. So my options are::
a) If Form_frmMain.Di rty Then
b) If Forms("frmMain" ).Dirty Then
c) If Forms![frmMain].Dirty Then.
For some reason, using option a) above causes one of my combo boxes to lose
it's records. The combo box is populated, using a callback function, from a
sql server stored procedure. Several other combo boxes are unaffected. If I
requery the combo box I get my records back. The problem occurs whether or
not the form is actually dirty - simply the reference to Form_frmMain
apparently vaporizes the records.
At the risk of starting a syntax flame war I just thought I'd mention this
here and see if anyone has any comments.
Other than "well don't use a) then" :-).
Comment