![]() |
|
|
#16
|
|||
|
|||
|
No, this is a text field when the table created, although it is put with numbers.
My other field code is not as complecated as this one, which is a simple condition, such as Private Sub anticoagulation_AfterUpdate() Me![DateOfStop].Enabled = Me![anticoagulation].Value = "0" Me![DateOfStop].Value = "" End this means if a patient didn't stop taking medicine, then no date of stopped. I really appreciate all of your time and help! |
|
#17
|
|||
|
|||
|
Quote:
Yes, it is strictly controlled, no other choices. Also, one only can select one choice, and impossible to have two people's data mixed...
|
|
#18
|
||||
|
||||
|
If it is a Text field then why wouldn't this code work?
Code:
Private Sub change_smoking_AfterUpdate()
If Me![change smoking] = "8" Then
Me![Ceased smoking] = ""
Me![Ceased smoking].Enabled = False
Me![ReducedSmoking] = ""
Me![ReducedSmoking].Enabled = False
Me![IncreasedSmoking] = ""
Me![IncreasedSmoking].Enabled = False
Else
Me![Ceased smoking] = ""
Me![Ceased smoking].Enabled = True
Me![ReducedSmoking] = ""
Me![ReducedSmoking].Enabled = True
Me![IncreasedSmoking] = ""
Me![IncreasedSmoking].Enabled = True
End If
End Sub
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#19
|
|||
|
|||
|
on your very first message here on this forum, you said that this is a combo box. is the data on your combo box could be from a table? if so, what is the data type of your number 0,1,8 on your table?
|
|
#20
|
||||
|
||||
|
A lot would depend on RowSourceType, RowSource, ControlSource and BoundColumn. Would you tell us what those values are please?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#21
|
|||
|
|||
|
Quote:
Here, my data question is smoking changed or not, if Yes, or No selected, then further question, ceased or redused smoking or increased smoking. NA mean never smoked, so it doesn't make sense to have ceased, redused, increased... VB code has this function. Also, I think here you talk data type as data format. Text type can have any kind of letters, numbers, signs, but numeric type only have number with some different format such as long, interger, simple, double etc. My data is text type for this field, even though number is put, this number doesn't have any meaning itself, only a definition is given then it make sense, it can not be calculated. 1 means Yes, 1 can also mean No, depanding on what meaning you assign to. Thank you very much for your time!
|
|
#22
|
|||
|
|||
|
Quote:
Row Source: L_YN/NA ( looke up dable with two columns: Yes 1 No 0 NA 8 controlSource: change smoking ( from the main table) Bound column: 2 Here I made typo to bound column 1. I just changed to column 2 when i checked. Now it works ![]() Such a tiny typo made me crazy Thanks a million to help me find problem! |
|
#23
|
||||
|
||||
|
Bingo! I knew we would get there eventually. Thanks for posting back with your success.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#24
|
|||
|
|||
|
good to know its working now.
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Variable Criteria | JamesLens | Queries | 0 | 01-02-2009 01:55 PM |
| Possible to store user-defined types in table? | Binky | Programming | 0 | 11-20-2008 11:28 AM |
| permision problem with access97 | dourvas | Access | 0 | 11-04-2008 03:07 AM |
| Variable question | synapse5150 | Programming | 1 | 07-09-2008 06:17 AM |
"Debug Error!" and crash while editting code or form
|
Dan Herrick | Access | 4 | 04-20-2006 10:30 PM |