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

Can I change values for a Combo Box based on specific condition

In my DB i need to change the value for a Combo Box based on some condition..
These values r retrieved from 1 of the tables(Glass)
My Query is in my form 1 of the Combo boxes display these values,but i need to change these values once the form is Loaded.

For Ex-If the Combo Box contains value as "Sliding door" it shud display the value in the Form as "SD".
Here for this if the table contains 10 such records as "Sliding Door",then for all the Records the new value displayed in the Formusing Combo Box shud be "SD".

Similarly if the table contains value as "Fixed",the actual value displayed in the Combo Box in the Form shud be "FP".

On which event do i need to write this code....
Expand|Select|Wrap|Line Numbers
  1. If Combo="Sliding Door" then
  2. Combo="SD"
  3. end if
In this code if i use for loop how do i refer to Total no of Records in the form.

Can anyone Plz help me on this...
Apr 15 '10 #1
1 2290
NeoPa
32,556 Expert Mod 16PB
If you set up the ComboBox in the first place to include columns for what you want to see and what value you want returned, then you simply display only the former, and set the Bound Column to the latter.

Access has been designed to make many of the more common requirements as easy as possible. The problem is that many people don't realise this and try to do it all the complicated way. I suggest you use the F1 key (Context-sensitive help) on the following attributes to get a better understanding of what can easily be done :
Row Source
Column Count
Column Widths
Bound Column
Apr 15 '10 #2

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

Similar topics

1
by: Ryann | last post by:
Hello. I have a form with a series 5 combo-boxes. All 4 contain the same query which lists Parts based on a productID from a previous form. i.e. cboPart1 = Part ID, Part, ProductID Where...
4
by: DebbieG | last post by:
I have a form based on this query: SELECT Students.LastSerDT, OtherInfo.Served, OtherInfo.HSGradYr, OtherInfo.ActivePart, OtherInfo.Served, Students.SSN, & ", " & & " " & AS Name,...
1
by: Aravind | last post by:
Hi folks. My database project has the following: -------------------------------------------------------------------------------- tables: Member: MemName, MemNo , MemType, CourseFaculty...
2
by: Dan Cook | last post by:
Ok... here's the scoop... I've got an unbound form with Serial Number, Building, and Room... all this is in tableA... Now I've got the form setup with building, room and serial number as combo...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
4
by: virtualgreek | last post by:
Dear All, First of all I would like to take the time to thank you all for your efforts and time spent at this wonderful forum. I have found it very helpful with numerous examples available for...
5
by: gokula309 | last post by:
Hi , I've a doubt using 2 frames in same page . PAGE 1 has 2 frames called F1 and F2. F1 refers page P2 F2 refers page P3 In this P2 has a drop down list (bank ), when it's changed...
4
by: Michael | last post by:
I have a repeater web control. Currently I want to change some row's color based on defined condition. Is there any code sample demonstrating how to accomplish it? Thanks.
2
by: mygirl22 | last post by:
Hi, I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo B) when Combo A is chosen..... What i need now is to know how to assign specific values to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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: 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...

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.