473,395 Members | 1,696 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,395 software developers and data experts.

Archive value for combo box.

I would like to have the ability to archive values in a lookup table. Take the following example

lookup table

luid, label, archive
1, green, No
2, red, No
3, blue, No

select * from lookup table where archive = false
I insert the above rowsource into a combo box. It works perfectly.

The users decide blue is no longer a valid color. You change the table as follows:

luid, label, archive
1, green, No
2, red, No
3, blue, yes

Now the old records that had blue selected show blank combo boxes!

in other words the value for a lookup table was once valid. It becomes invalid. I would like the user to see the value of what once was but no be able to select if for current records. I don't want to remove it from older records, but do not want it to be a valid response for future current records. I would like to make it user friendly. (fewer key strokes, not yelling at you for selecting an archived values)

Everything I can think of seems so contrived lots of buttons a combobox just for updating.

Thanks in advance
Apr 13 '08 #1
1 1329
FishVal
2,653 Expert 2GB
Hi, whitbacon.

A general approach is dynamically change combobox RowSource in Current form event to fit combobox content to a current record context (certainly other situations, e.g. record editing, dealing with record context changing should be treated in the same way).

Combobox RowSource may look like
Expand|Select|Wrap|Line Numbers
  1. select * from [lookup table] where archive = false OR luid=  ... [luid] value for the current record either as constant or form control reference ....
  2.  
BTW:

The users decide blue is no longer a valid color.
Would it make more sense to make [archive] a Date type field - a date when a colour was moved to archive? Also you may add additional date field - for colour introduction date. Thus you have a date frame when particular colour is valid. Combobox RowSource is filtered by a date in FK side to fit the frame. This way you get more flexible database design.

Does this make a sense?

Regards,
Fish
Apr 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: cwizard | last post by:
I'm calling on a function from within this form, and there are values set but every time it gets called I get slammed with a run time error... document.frmKitAmount.txtTotalKitValue is null or not...
2
by: Terry Bickle | last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4 macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB. I'm sure there is a simple Access 101...
3
by: anita | last post by:
Hi All Can anybody pls help me out with this problem. I have a combo box control which has about 10,000 values in it. These values in the combo box are called from a different table. When i use...
8
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
1
by: meganrobertson22 | last post by:
Hi Everyone- I am trying to use a simple macro to set the value of a combo box on a form, and I can't get it to work. I have a macro with 2 actions: OpenForm and SetValue. I can open my form,...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
20
by: MLH | last post by:
120 MyString = "How many copies of each letter do you need?" 150 MyVariant = InputBox(MyString, "How Many?", "3") If MyVariant = "2" Then MsgBox "MyVariant equals the string '2'" If...
4
by: Torilyn73 | last post by:
I have a combo box set up off a query. I want the default value to be the column heading so I don't have to put a label over it. So far I haven't been able to figure this out. Can anyone tell me if...
9
by: oriondcv | last post by:
hi, please help me on this issue that im facing... I have created a filtered combo box in ms access. It works but the value it inputs in the database is the primary key value like in my program...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.