ok thx.. that makes sense
---In MS_Access_Professionals@yahoogroups.com, <strive4peace2008@...> wrote :
box control? <<>> Why does it work for a combo control but not for a list
a combo box is a combination of a textbox and a listbox -- that means you can type into it and it can, therefore, have a default value. A listbox does not accept data entry.
with a listbox, you would have to set the "default" value by assigning the value in code -- just as you have to clear a listbox with code.
crystal
http://www.MsAccessGurus.com
connect to me, let's build it together
~ have an awesome day ~
On 5/14/2017 1:37 AM, John Viescas JohnV@... [MS_Access_Professionals] wrote:
Careful, that may not be saying much. I COMPLETELY boffed using ListCount in my conversation with Art.
John Viescas, authorEffective SQLSQL Queries for Mere MortalsMicrosoft Office Access 2010 Inside OutMicrosoft Office Access 2007 Inside OutBuilding Access Applications
On May 14, 2017, at 05:47, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
YES! I can say with a straight face that I know as much as John Viescas!
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Your guess is as good as mine!John Viescas, AuthorEffective SQLSQL Queries for Mere MortalsMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access Applications(Paris, France)
On May 13, 2017, at 5:37 AM, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Why does it work for a combo control but not for a list box control?Just because..?
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
David-A Default Value is to be applied to a field in a record in a table. It is the "Default" value that will be saved to the edited new row if the user doesn't override it. When a control is unbound, there is no field or record or table, so it doesn't work. It's still a valid property of the control, so that's why you don't get an error.John Viescas, AuthorEffective SQLSQL Queries for Mere MortalsMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access Applications(Paris, France)
On May 12, 2017, at 9:43 PM, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Your are correct, these are unbound list boxes.I changed the OnOpen event fromme.lstCorporations.defaultvalue = glngCorporationIDtome.lstCorporations.value = glngCorporationIDI'm sure it is no surprise to you, but it now works. If you don't mind taking the time please, I would like to understand the "why" of this. In both cases I am referencing the same control (me.lstCorporations). Setting the default value does not work, but does not throw an error. Setting the Value works.On several other forms (similarly, subforms of the Nav form control) I have unbound combo boxes. And for those combo boxes in the form OnOpen event, I am setting the combo value with:cboCorporation.DefaultValue = glngCorporationIDand that is working with no problem.Can you please explain why this works this way? Unbound List boxes cannot have default values, and instead only have values; but unbound combo boxes can have default values?
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
David-Are the list boxes bound? If not, then setting the Default Value will do nothing. Set the value of the controls instead.John Viescas, AuthorEffective SQLSQL Queries for Mere MortalsMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access Applications(Paris, France)
On May 12, 2017, at 3:56 PM, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
__._,_.___
Posted by: david.pratt@outlook.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (10) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar