Fields BackStyle/BackColor Changes Unexpectantly

Access 2007

I'm using the following code to filter records in frmHomeInv.

Dim strAll As String
Dim strSQL As String

    If Me!cboProductTypeFilter.Column(1) = "<<All>>" Then

        strAll = "SELECT * FROM tblHomeInv ORDER BY ProductTypeID, Product"
            Me.RecordSource = strAll
            Me.lstHomeInv.RowSource = strAll
            Me.lstHomeInv.Selected(0) = True

        Else

        strSQL = "SELECT * FROM tblHomeInv WHERE (((ProductTypeID)=" & 
[cboProductTypeFilter].[Value] & "))ORDER BY ProductTypeID, Product"
            Me.RecordSource = strSQL
            Me.lstHomeInv.RowSource = strSQL
            Me.lstHomeInv.Selected(0) = True

         End If

After returning the proper records, the BackStyle or the BackColor of the 
ProductTypeID field that is in tblProductType and has a relationship with a 
field by the
same name in tblHomeInv, changes to the existing BackColor of the Detail 
section of the Form.
This does not occur at this time with any other form but has previously and 
I'm not sure why it stopped doing it.
Even placing code at the end of If..Else to force the proper color doesn't 
work.
Did Compact and repair......

Any help will; be appreciated. 

0
JamesJ
4/20/2007 9:41:55 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
637 Views

Similar Articles

[PageSpeed] 37

Addendum.
This fields BackColor doesn't change color when it is in the header or 
footer of the form and it
doesn't change color when I use Overlapping forms for the Current Database 
only  tabbed formd.

James


"JamesJ" <jjy@Darwin_adelphia.net> wrote in message 
news:OMz43S5gHHA.4552@TK2MSFTNGP04.phx.gbl...
> Access 2007
>
> I'm using the following code to filter records in frmHomeInv.
>
> Dim strAll As String
> Dim strSQL As String
>
>    If Me!cboProductTypeFilter.Column(1) = "<<All>>" Then
>
>        strAll = "SELECT * FROM tblHomeInv ORDER BY ProductTypeID, Product"
>            Me.RecordSource = strAll
>            Me.lstHomeInv.RowSource = strAll
>            Me.lstHomeInv.Selected(0) = True
>
>        Else
>
>        strSQL = "SELECT * FROM tblHomeInv WHERE (((ProductTypeID)=" & 
> [cboProductTypeFilter].[Value] & "))ORDER BY ProductTypeID, Product"
>            Me.RecordSource = strSQL
>            Me.lstHomeInv.RowSource = strSQL
>            Me.lstHomeInv.Selected(0) = True
>
>         End If
>
> After returning the proper records, the BackStyle or the BackColor of the 
> ProductTypeID field that is in tblProductType and has a relationship with 
> a field by the
> same name in tblHomeInv, changes to the existing BackColor of the Detail 
> section of the Form.
> This does not occur at this time with any other form but has previously 
> and I'm not sure why it stopped doing it.
> Even placing code at the end of If..Else to force the proper color doesn't 
> work.
> Did Compact and repair......
>
> Any help will; be appreciated. 

0
JamesJ
4/20/2007 10:04:34 PM
Reply:

Similar Artilces:

Changing a text field to a number
Hello there! I imported a MS Project file in excel and I have values in cell like 3.5d (3 and a half days)...I would like to browse all cells and remove the day to get only the numbers... The 'd' is always the last character in the cell... I tried using a macro but failed... Has anyone any idea about how to browse a column (top to bottom), remove all the "d" and go to the next column on top Thank you so muchfor your precious help Michel On Mon, 4 Aug 2003 09:17:29 -0500, "Michel Khennafi" <mkhennafi@mke.catalystwms.com> wrote: >Hello there! > >...

Applescript question: changing format of selection...
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel Greetings! I entered a long text in an active cell. Then I selected a part of text in the active cell. Now I want to write a script which changes format of selected text or part of the cell. Can you help me to do it please? Here is the needed code for characters XXX-YYY in an active cell: tell application "Microsoft Excel" tell font object of (characters XXX thru YYY of active cell) set subscript to true end tell end tell But how to extract XXX and YYY from the current selec...

Change area to bar and bar to area
Is there a way to switch the bar to area and area to bar. I have a custom type using column-area ... my display shows 2009 as area and 2008 as column. I want to switch look so the 2009 has the column ... is there a way to switch. Thanks much! Hi, You can select a series and changes it's chart type. Try selecting the area and changing to bar. Then select the original bar and change to area. Alternatively change the layout of your data so the 2008 data comes before the 2009. Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Annette" <sh...

How do I change the color scheme of the autoformat for table 2?
I am applying an autoformat to a pivot table and I want to know how to change the colors, fonts, and bold to the autoformat. How do I accomplish that? ...

Change existing task tab on form
I would like to alter the task tab on the defualt task form. The form editor seems to only allow altering seperate tabs. Is there a way to change the fields on the defulat task tab on a form? Thanks ...

Date field not stay in same format
I have a Due Date field in my form. I noticed the date not stay in the format I want dd/mm/yyyy. it keep change back to mm/dd/yyyy when user enter 22/03/2008 ==> 03/22/2008. How do I make the date stay as dd/mm/yyyy. As long as the day is below 12, then the format stay as 12/03/2008 (dd/mm/yyyy). Any help to correct this problem is appreciated. Thanks. Access displays dates in the format you specified for your regional settings. Go to Regional Options in the Windows Control Panel to define your date format. For details, see: International Date Formats in Access at: ht...

How do I change the order of items in a graph legend?
Hello, I am trying to create charts for different timframes, have listed the data in similar fashion in two different spread sheets. When I create graphs, the order of legend is not identical in the two graphs. It needs to be consistent. Appreciate any help along these lines. Thanks, Hi, You can use the series order option in the format dialog to change the order. Double click a series to display the format dialog. Note though that the series need to be of the same chart type and on the same axis in order to manipulate the series order. Cheers Andy NsShak wrote: > Hello, I am...

How do I change outlook settings to open a weblink from Email?
Since I installed windows7 I am unable to open weblinks from outlook emails. Ask me to contact the administrator as this operation has been cancelled or restricted. I am the administrator. There was no problems with windows Vista. How and where should I change the security settings for this. I can open another link from IE with no problem. I am grateful for any help. Thank you. This is an issue with IE. See below http://www.slipstick.com/problems/link_restrict.htm -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will ...

XML 2005 Late-Breaking and Product Presentation Deadline
XML 2005 Late-Breaking and Product Presentation Deadline - Tutorials Added/ changed XML 2005, November 14-18, Atlanta Hilton Hotel, Atlanta, GA http://www.xmlconference.org The deadline for late-breaking, product presentations, and town hall submissions is Friday, September 16. http://2005.xmlconference.org/node/31 The late-breaking presentations are intended to be filled with late- breaking news; however good presentations on other topics that don't duplicate material already on the program will also be considered for these slots. Submissions on fresh topics such as Ajax, alternatives ...

i want to change dollar sign to rands on excel invoice?
i want to currency on to rands on excel invoice and my format cell is not activeted Sylivia, Choose a defined currency format that you like, and then click on custom (at the bottom of the list). You'll see the format in its code, simply replace each currency symbol within that line with R. Cheers, A "sylvia" wrote: > i want to currency on to rands on excel invoice and my format cell is not > activeted > Hi Sylivia Clearly you are in South Africa. Go to Start|(Settings)|Control Panel|Regional Options, and select English(South Africa) as input locale. You...

Default font when changing from Plain text to HTML
In Outlook 2003: When I change a plain text mail to HTML, the font automatically becomes Times Roman 10 Point. How do I set the font I'd like it to change to Change your default Plain Text font in; Tools-> Options...-> tab Mail Format -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers ----- "Allan TFF" <AllanTFF@discussions.microsoft.com> wrote in message news:2A8D931E-...

Upsizing and Limit of number of fields
Hi, Does anyone know if you upsize your Acess 2002 db does the limitation of 255 fields per table go away (the new limit would be that of SQL- 8000chars)? I know...I shouldn't have a table with 255 fields, but let's assume I do. thanks, Cheri wrote: > Hi, > Does anyone know if you upsize your Acess 2002 db does the limitation > of 255 fields per table go away (the new limit would be that of SQL- > 8000chars)? I know...I shouldn't have a table with 255 fields, but > let's assume I do. thanks, It goes away as far as building the table on SQL Server is concern...

Unable to add the custom field to the activities preview/view
Hello, All! How can the columns (e.g. owner) be reflected in activities preview, e.g. in open activities or all activities? With best regards, Aleksey Tomashevskiy. in the current release you cannot do this. The next release of CRM is supposed to have this functionality -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "Aleksey Tomashevskiy" <tomashevskiy@hotmail.com> wrote in message news:OMmJNwrDFHA.3340@TK2MSFTNGP10.phx.gbl... > Hello, All! > > How can the columns (e.g. owner) be reflected in activities preview, e.g. in > open activities or ...

IIS Admin Service terminated unexpectedly
I have been having this problem lately on my Exchange 2003 sp1 server sitting on Windows 2003 sp1. We use Trend Micros ScanMail, and IHateSpam The IIS Admin Service service terminated unexpectedly. It has done this 2 time(s). The following corrective action will be taken in 1 milliseconds: Run the configured recovery program. Any ideas why this has been happening? If I try to restart the smtp service, it sometimes hangs, and I have to reboot the server Bruce Do you get any errors in the event logs? Nue "Bruce" <Bruce@discussions.microsoft.com> wrote in message n...

Why do my jpg files change to gif on the web?
Hoping someone out there can help me. My pictures are saved as jpg but when I do "web preview" or view my website the pictures are in gif. How can I fix this? I use Publisher98. Thanks Karin wrote: > Hoping someone out there can help me. My pictures are saved as jpg but when > I do "web preview" or view my website the pictures are in gif. How can I fix > this? I use Publisher98. > Thanks Karin, I use pub98 all the time, but NEVER FOR WEBSITES. I'll get flamed for saying it, but use an actual website program or learn html to make a site to your ...

How do you change the font size and color in insert caption?
When inserting a caption it comes out in blue and a different size font - how do you change it? Modify the Caption style to reflect however you want it to appear. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Victoria M." <Victoria M.@discussions.microsoft.com>...

Accept or reject changes in shared files
I have a shared file on a server drive which is shared by a work group of five users. I can see the hchanges highlighted for the different users, and I can accept or reject. The problem is that so can all the users.!! I need exclusive ability, as the "Master" of the situation, to acccept or reject changes. I do not want the rest of the group to have this ability. What am I doing wrong?? Thanks for any advice Jim Normile Jim, When a workbook is shared, it means more than one person can open it for update. This is normally disallowed in a multi-user environment. They both star...

Function to access custom fields in Properties
Is there a function that can retrieve the value of any particular custom field in the file's Properties? Word has this but I can't find it in Excel. Hall Copy/paste this User Defined Function to a module in your workbook. Function DocProps(prop As String) Application.Volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function =DOCPROPS("last author") or =DOCPROPS("last save time") Gord Dibben Excel MVP On Wed, 15 Jun 2005 21:59:56 ...

Changing text in title bar
I want to change the display in my opportunity title bars. Basically, I want to be able to do something similar to contacts. In contacts form, both the first name and surname are displayed in the title bar as a full name. In the opportunity form, I want to change the display so both the opportunity title and the job number it has been assigned are shown. I realise this may be difficult to change in an existing form, but I'm hoping someone can help. Failing that, I have another custom form that I want the same functionality for (i.e. the primary field of the entity plus the value of the...

how to change Administrator mailbox Exchange 2003
We have migrated from an NT 4 domain to a new Windows 2003 Active Directory domain. We have an Exchange 5.5 and Exchange 2003 site with ADC running between the mail servers. ADC created an account for the old domain Administrator (which has a mailbox on the 5.5 server) in the AD Recepients container (and disabled it) and associated the Exchange 5.5 mailbox with it. The new domain already has an Administrator account (built-in account) in the User container. How can I associate the mailbox with the enabled Administrator account in the Users container, and get rid of the disabled Administrat...

Change font on dropdown menu items
Hello, I would like to change the font, positioning of text etc. on my dropdown menu items. The items have been stored in a cell range on another sheet. Is there a way to format the text? Many thanks in advance. --- Johanna Unfortunately, that is not possible in XL. See link for further details, and possible work-around: http://www.contextures.com/xlDataVal08.html#Font -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Johanna Gronlund" wrote: > Hello, > > I would like to change the font, positioning of...

Changing Cell width without making the whole column that width?
Can someone please help? I'm trying to design a new spreadsheet fo work. In a column, I try to make a cell (say on row K) narrow, bu then the whole column goes to that same width. Is there a way to jus make a particular cell on a particular row narrow without making th whole column that width? Thanks. -Ke ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com You get all or nothing with column widths, you can use merged cells if that would help -- Paul B Always backup y...

change pointer
hot to change it from a "hand" to an "arrow" when selecting a box or button? ...

Display "From" and Changing Accounts
I am using Outlook 2000 and have a couple of different Accounts. Is there any way of seeing a "From" bar when sending and choosing the account it is sent from. I know I can go to Tools - Accounts and change the default there. Outlook Express allows this. Thanks. Once you have the new email open go to View and select From field. This will stay active until you deselect it. The secret is having the message open because this option is specific to sending email. >-----Original Message----- >I am using Outlook 2000 and have a couple of different >Accounts. Is there an...

Change of FA Cost into GL
Once you add the asset in Fixed Asset Direct Cost or Indirect Cost (Integration with PM or POP) the account group at the time of creating asset will used. After sometime you realize that the asset you created has wrong account group defined later you change the accounts of asset, after the changes of accounts group this will not effect to your Fixed Asset to GL Reconciliation report unless you run some SQL scripts from back end and update the FA00902 and FA00400 tables. My suggestion to Microsoft is to come up with solution for this and as Certified Microsoft Great Plains Specialist I...