- Local time
- Today, 08:00
- Joined
- Oct 29, 2018
- Messages
- 22,174
And, did it make any difference? Just curious...Oops. Just went back to that combo and realised I'd changed it by mistake. It SHOULD be 4
Also, is this on A365 only?
And, did it make any difference? Just curious...Oops. Just went back to that combo and realised I'd changed it by mistake. It SHOULD be 4
Actually, it works even if the first field is hidden
View attachment 98145
View attachment 98146
View attachment 98147
As soon as you click in the combobox the default text disappears automatically
Well, that became .0007, and the default text did show up! However, now after the name of the doctor is chosen from the list part, the top shows the id instead of the name.Try making the first column slightly >0 e.g. 0.01or even 0.001
Then i'm doing something wrong, but i do not know what.If the ID field is the first column (column 0) it shouldn't be visible with a width close to zero.
I explained how to make the default text grey in post #13.
To get grey prompt text for this example, first set the control forecolor to grey, then the format property could be: [Black]@;"Enter Last Name"
The prompt text will be grey but the text entered by the user will be black
Nope. I wasn't sure what it was addressing because it spoke of color. I see the part you were referring to now though.Have you read my web article? If not, please do so.
I indeed did skim the article. I logged out of work for the day, so i didn't feel like going to in depth right now.You could at least do me the courtesy of spending a few minutes reading that to understand the ideas behind this approach.
Then it might be less confusing to you
me.DoctorFK=cboDoctor.column(0)
I'm way too tired to appreciate that comment right now. Especially while working on someone else's project right now.format property is usually one of the drums I bang
@chacham What Colin is saying for it to work in a combo is the bound column needs to be the first visible column (i.e the one that shows when the dropdown is closed). Doesn't matter whether the controlsource is populated or not.
In your case, you may need to bind to the hidden PK so the format option won't work unless you can do the following
1. leave the controlsource blank - as you have in post#22
2. set the bound column to column 2 - you have column1 in post#22
3. in the combo after update event some code along the lines of
or perhaps you just need to make a change to building your filter/criteria (i.e. include .column(0))Code:me.DoctorFK=cboDoctor.column(0)
4. if the control is bound you will also need some code in the form current event to set a value - along the lines of
cboDoctor=dlookup("DocName","tblDoctors","DoctorPK=" & me.doctorFK)
Note this won't work in a continuous form if the combo is in the detail section
Which is why my suggestion in post#9
you Already have a working db? why experiment more.But i do have to ask. Do you think this is easier than the solution i posted originally?
Because i'm quite the newb here, and beginning to work on someone else's project. I'm asking to make sure i'm not doing something stupid. Also, even solutions i don't take still teach me useful things!you Already have a working db? why experiment more.
my final comment would be that with your method, you need more code to make cmbNH_default_text visible again in the event that nothing is selected