Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Lebans Continuous Forms Sample Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnR - 28 Apr 2005 00:28 GMT
I need to change the background of each record on a continuous form based on
the value of one of the fields.  From this Newgroup I was led to Stephen
Lebans sample database.  I was able to adopt it to my needs and it works
great.  (Thank you Stephen)  However when I scroll down the form, the
formatting doesn't change.  Each record keeps the color of the record that
originally occupied that space on the form.  Does anyone know how to capture
the scroll event to rerun the code as the record changes?

Thank You

John
Stephen Lebans - 28 Apr 2005 01:04 GMT
Which sample of mine are you referring to?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I need to change the background of each record on a continuous form based on
> the value of one of the fields.  From this Newgroup I was led to Stephen
[quoted text clipped - 7 lines]
>
> John
JohnR - 28 Apr 2005 16:18 GMT
SubClassFormatByCriteriaVer45.mdb

It changes the initial forms perfectly, but when I scroll down a page or use
PageDown the data changes but the forms keep the original colors.

> Which sample of mine are you referring to?
>
[quoted text clipped - 22 lines]
>>
>> John
Stephen Lebans - 28 Apr 2005 20:19 GMT
That solution is only for A97. WHich version of Access are you using?
For A2K see:
http://www.lebans.com/conditionalformatting.htm
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> SubClassFormatByCriteriaVer45.mdb
>
[quoted text clipped - 27 lines]
> >>
> >> John
JohnR - 28 Apr 2005 21:19 GMT
2003  :-(

Too bad, because it looked great.  The client insists on 6 different colors,
so I can't use the built in conditional formatting.  I'll think of
something.

Thank you for your assistance and all the great content on your web site.

John

> That solution is only for A97. WHich version of Access are you using?
> For A2K see:
[quoted text clipped - 45 lines]
>> >>
>> >> John
Stephen Lebans - 28 Apr 2005 21:46 GMT
Well I never bother porting it to A2K or higher simply because
Conditional Formatting is now directly supported. If you are willing to
test it out then only 2 lines of code need to be changed.
Addrof needs to be modifed to call the now supported native AddressOf
method instead.

Let me know.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> 2003  :-(
>
[quoted text clipped - 55 lines]
> >> >>
> >> >> John
JohnR - 28 Apr 2005 22:37 GMT
I could only find one line.

It goes into a loop and freezes the form
CTRL Break gets it to stop on

Public Function WindowProcSB(ByVal hWnd As Long, ByVal message As Long,
ByVal wParam As Long, ByVal lParam As Long) As Long

> Well I never bother porting it to A2K or higher simply because
> Conditional Formatting is now directly supported. If you are willing to
[quoted text clipped - 82 lines]
>> >> >>
>> >> >> John
Stephen Lebans - 29 Apr 2005 00:44 GMT
Now I remember why I did not port this sample to A2K. It's the old
Subclassing/VB IDE bug. If you have had or currently opened the VB  IDE
window, then Access WIndow MEssage queque will get overloaded. If you
open the Form without having had the VB IDE open at any point during
this session then you will not encounter this bug.

There also seems to be a change from A97 in the sequence of form events.
Comment out all of the code in the resize event.

Tomorrow, I'll have a look at placing the sublassing code within an
external DLL as this is the only solution to the Subclassing bug.

It brings joy to my heart to see all of those ugly colors again on an
Access Form!<grin>
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I could only find one line.
>
[quoted text clipped - 90 lines]
> >> >> >>
> >> >> >> John
JohnR - 29 Apr 2005 20:26 GMT
I really appreciate your efforts.

If I distribute this as an MDE would that prevent the problem?

> Now I remember why I did not port this sample to A2K. It's the old
> Subclassing/VB IDE bug. If you have had or currently opened the VB  IDE
[quoted text clipped - 124 lines]
>> >> >> >>
>> >> >> >> John
Stephen Lebans - 29 Apr 2005 21:18 GMT
Yes, that is the only current solution.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I really appreciate your efforts.
>
[quoted text clipped - 128 lines]
> >> >> >> >>
> >> >> >> >> John
JohnR - 30 Apr 2005 00:37 GMT
Thank you very much.

> Yes, that is the only current solution.
>
[quoted text clipped - 155 lines]
>> >> >> >> >>
>> >> >> >> >> John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.