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

display more than 255 char field in combo box

Hi all,

I have got a question here perhaps someone can provide me some good information or suggestion.

In the Access Form I have created 2 combo box one is Activity combo box, the other is Condition combo box.
When i select on Activity combo box value, my Condition combo box will display all the descriptions of the Condition corresponding to the Activity i have selected. ( this is what i wish to get)

The problem i have encountered is when i select on Activity combo box value, the Condition combo box will only be able to display the certain of values, i think it is because Combo box size has a limitation of 225 length, i think my condition value is more than 225.

So what should i do now in order to get my condition box display all the values which i have set on the condition table.

Please feel free to ask me if have got any queries.

Many thanks.

Ray
Apr 10 '07 #1
10 7206
MMcCarthy
14,534 Expert Mod 8TB
Hi Ray

I assume your condition field is a memo. This is going to be a problem as I don't think you can display a memo field in a combo box so Access is defaulting to a text field with a 255 maximum length. If you explain what you are trying to do and why we may be able to suggest an alternative.

Mary
Apr 10 '07 #2
Hi Mary,

My database is like that when user choose on one of the activity from the Activity Combo Box lets say "Camping", when Camping value is selected the Condition Combo box will show all the condition which need it for Camping such as C1, C2, C3 and so on. However user would like to know what are C1, C2,C3 stands for, that's why i would like to let user know the each different description of condition instead of only showing C1, C2 and C3.

Many thanks.

Cheers
Ray
Apr 10 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi Ray

Put a textbox (txtDesc) on the form and in the AfterUpdate or OnChange event of Condition combo put the following:

Expand|Select|Wrap|Line Numbers
  1. Me!txtDesc = DLookup("[Description]", "Tablename", "[Condition]='" & Me!Condition & "'")
You will have to change the field and table names to your own but you should get the idea.

Mary
Apr 10 '07 #4
Hi Mary,

I have tried what you said to me however it doesn't show the description on the txtDesc box. Am i doing something wrong?

Many thanks.

Cheers
Ray
Apr 13 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Hi Mary,

I have tried what you said to me however it doesn't show the description on the txtDesc box. Am i doing something wrong?

Many thanks.

Cheers
Ray
Hi Ray

Post the code you've used with your own fieldnames and tablename and I'll have a look.

Mary
Apr 13 '07 #6
Hi Mary,

My code is as follows and i think i have messed up something as i just learn how to Access recently.

Private Sub ConditionID_Change()
Me!txtDesc = DLookup("[Condition]", "TabCondition", "[ConditionID]='" & Me!ConditionID & "'")
End Sub

I have named my condition table as TabCondition, in the TabCodition i have created 3 FieldName :
FieldName Data Type
(1)ConditionID Number
(2)Condition Memo
(3)EventID Number

I have followed what you said to create a text box in form and i have named it as txtDesc.

Sorry for any inconvenience!
Apr 14 '07 #7
Mary,

One more question to ask you! Do you know how to order the Access to get a word document from somewhere in the computer and print it?


Many thanks.


Cheers
Ray
Apr 14 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
ConditionID is a Number so it doesn't need single quotes.
Expand|Select|Wrap|Line Numbers
  1. Private Sub ConditionID_Change()
  2.    Me!txtDesc = DLookup("[Condition]", "TabCondition", "[ConditionID]=" & Me!ConditionID)
  3. End Sub
Also check that your combobox is called ConditionID?
Apr 14 '07 #9
Hi Mary,

Finally it worked! Thanks very much.

I found a problem here when i create a new record in Access, the condition txt box doesn't clear the data automatically?

So do you know how to clear the previous data entry form after the creating the new record?

Many thanks.

Cheers
Ray
Apr 15 '07 #10
MMcCarthy
14,534 Expert Mod 8TB
Hi Mary,

Finally it worked! Thanks very much.

I found a problem here when i create a new record in Access, the condition txt box doesn't clear the data automatically?

So do you know how to clear the previous data entry form after the creating the new record?

Many thanks.

Cheers
Ray
Expand|Select|Wrap|Line Numbers
  1. Me!txtDesc.Refresh
  2. OR
  3. Me!txtDesc.Requery 
should clear it.
Apr 16 '07 #11

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

Similar topics

0
by: Steve | last post by:
I have a combo box which contains a list of JobStatus's which are paired, "Description" (a string to display) and "StatID" (an Int to store). These come from my JobStatus table. I have a screen...
2
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that...
5
by: sparks | last post by:
After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0 they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the...
3
by: BrianDH | last post by:
Hi Is there a way to have the view/display width different from the width as it sits on the form?
3
by: BrianDH | last post by:
Hi Is there a way to have the view/display width different from the width as it sits on the form? Thanks Brian
1
by: Jimmy Stewart | last post by:
Is there a way to set up a combo box so that when the user clicks the arrow, the list is populated with info from a specific field from a table but once they select an option, data from another...
4
by: rszebras | last post by:
I inherited a database (as a novice at Access) and need to modify it to make it more efficient, i.e., the assignment form needs to autopopulate with the client's name, address, phone number, etc.,...
1
by: tremonti92 | last post by:
Hello.. I have a table with a field name called 'Professions'. There are many same multiple values for this field, for example, there are many records with the value 'Doctor' under this field. ...
3
by: Coll | last post by:
I have a form that had been setup with a combo box. You'd select a value from the combo box and a query would open and display matching records. I now need to remove the combo box and set up a text...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.