473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access 2002 Conditional Caption

I have a form that returns 100 items. All of the items have have a
different value in their Category field.

EXAMPLE:
----------------
A
B
C

How can I change the value of the caption in the field label on the
form based on the category? I attempted a series of Case statements
but it didn't seem to work when values of mixed categories were
returned.

Select Case PriceCat
Case "A"
MsgBox ([tblProduct.PriceTyp])
Me![frmSubSearch].Form.prdPrice1Gl.ControlSource =
"PriceTypeA"
Me![frmSubSearch].Form.prdPrice5Gl.ControlSource =
"PriceTypeB"
Me![frmSubSearch].Form.prdPrice5GlCF.ControlSource =
"PriceTypeC"
Me![frmSubSearch].Form.lblItemSubPrice1.Caption = "A"
Me![frmSubSearch].Form.lblItemSubPrice5.Caption = "B"
Me![frmSubSearch].Form.lblItemSubPrice5CF.Caption = "C"
Case Else
Me![frmSubSearch].Form.prdPrice1Gl.ControlSource = "1"
Me![frmSubSearch].Form.prdPrice5Gl.ControlSource = "2"
Me![frmSubSearch].Form.prdPrice5GlCF.ControlSource = "3"
Me![frmSubSearch].Form.lblItemSubPrice1.Caption = "1"
Me![frmSubSearch].Form.lblItemSubPrice5.Caption = "2"
Me![frmSubSearch].Form.lblItemSubPrice5CF.Caption = "3"
End Select
Jan 16 '08 #1
0 963

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
4
by: Wayne Aprato | last post by:
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
1
by: Arif | last post by:
I have a bizarre problem. I am using a code module to update the Caption property of the buttons of a custom toolbar. Though the code module works fine, the new caption does not immediately show on...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
1
by: RIP662 | last post by:
Okay all you GURUS out there... here's the skinny... I need a way to prevent the Me.Dirty event to trigger after a FORM_OPEN event. What I have is a field that is dependent on another field that...
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
23
by: Wayne Wengert | last post by:
In a Datagrid I have a field (<td>) in which I want to display a link if a database field is still Null but I want to display a blank (&nbsp;) if that DB field has a value. If I try to put the...
7
by: dkohel | last post by:
I have a form that returns 100 items. All of the items have have a different value in their Category field. EXAMPLE: ---------------- A B C How can I change the value of the caption in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.