Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2005, 08:05 AM
Authorized User
 
Join Date: Apr 2004
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lguzman
Default Highlighting calls from a same region

I have an application that reads live from a phone log. The calls that come in appear on screen. I would like to change the background of calls from the same region, if more than one. Meaning if there are duplicate calls from one region I would like to change the background to a common color for that region. I would like to be able to identify up to 5 groups of duplicates (5 different colors).

Thanks.

LG

Ooopsss.... Forgot to mention, the colors can't be associated to a specific region, since at any point I may or may not have calls from that specific region. It should be more like a first come first served kind of scenario. If I have more than five groups of duplicates the following ones might get a distinguishable common background color.

[LGuzman]
__________________
[LGuzman]
 
Old April 6th, 2005, 06:35 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You are going to have to use a module to do this that is associated with the form or report you are using.

When you gather this data from the call log, are you storing it temporarily in a table and then removing it to permanent storage? Or are you deleting it from the database? How often are the updates?

You can do this, but you may have to store the data temporarily in an on-screen table. Do you have any of the structure for this available?

mmcdonal
 
Old April 6th, 2005, 12:08 PM
Authorized User
 
Join Date: Apr 2004
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lguzman
Default

The data is stored in a table. Each record when logged, is given a status of new. After the user completes the process (they need to do) modifies the status to complete. The system archives the completed calls to another table.

The system reads the log file every 15 seconds and appends any new call to the table being used in the display.

[LGuzman]
 
Old April 6th, 2005, 12:23 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That's pretty easy then. You just do a module that counts New calls by region from the table and totals them up. Then apply the BackColor you want, or ForeColor if it is the font you want to change.

You query the table for all calls where Status = New, for eample. Once you have that recordset, you count each region and total them up. Once you have the totals, you can apply BackColor for highlighting based on your parameters. If txtBox.Value = stFirstRegion Then txtBox.BackColor = lngFirstValue End If etc. You may even be able to do this on one of the form's events and have it take values back from the module.

Do you have the form name and the layout (text boxes effected?)

mmcdonal
 
Old April 6th, 2005, 04:17 PM
Authorized User
 
Join Date: Apr 2004
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lguzman
Default

I have tried something like that but the moment I give a value to the backcolor when the condition is met (multiple entries from same region), all of the records specific field backcolor changes!

[LGuzman]
 
Old April 6th, 2005, 06:27 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Try resetting all the back colors at the beginning of the block of code.

Lemme know...

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
implementing a region in interface mohammadalsayeh .NET Framework 2.0 1 August 27th, 2007 08:28 PM
Repeating Region DynaCube Classic ASP Basics 0 January 12th, 2007 11:26 PM
Repeat Region with a difference. fatmcgav Dreamweaver (all versions) 2 January 17th, 2005 05:00 PM
Region? JAtkinson Visual C++ 0 May 17th, 2004 07:02 AM
#region text in RichTextBox? mfourre C# 1 August 7th, 2003 12:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.