Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 5th, 2005, 08:05 AM
Authorized User
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada.
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]
Reply With Quote
  #2 (permalink)  
Old April 6th, 2005, 06:35 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old April 6th, 2005, 12:08 PM
Authorized User
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada.
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]
Reply With Quote
  #4 (permalink)  
Old April 6th, 2005, 12:23 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #5 (permalink)  
Old April 6th, 2005, 04:17 PM
Authorized User
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada.
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]
Reply With Quote
  #6 (permalink)  
Old April 6th, 2005, 06:27 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:17 PM.


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