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
10 7206
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
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
Hi Ray
Put a textbox (txtDesc) on the form and in the AfterUpdate or OnChange event of Condition combo put the following: - 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
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 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
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!
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
ConditionID is a Number so it doesn't need single quotes. -
Private Sub ConditionID_Change()
-
Me!txtDesc = DLookup("[Condition]", "TabCondition", "[ConditionID]=" & Me!ConditionID)
-
End Sub
Also check that your combobox is called ConditionID?
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
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
- Me!txtDesc.Refresh
-
OR
-
Me!txtDesc.Requery
should clear it.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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?
|
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
|
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...
|
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.,...
|
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.
...
|
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...
|
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...
|
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
|
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...
|
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...
|
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: 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,...
|
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...
|
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,...
|
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...
| |