Duane,
I just wanted to say thank you for the help. With your suggestions it is now working and I finally grasped the difference in using Me.cboXXX in VBA versus using Forms!frmXXX!cboXXX in the design window; and the importance of where the quotes are placed.
I have a lot to learn! Tnank you for your help.
---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :
David,
With my suggested code you are setting the row source to an explicit string. The reference to "Me." is not inside the quotes so it will not appear in the row source, only the value of the control. This also means you need to set the RowSource after updating cboSampleGroup. The extra space is required just like every statement you have previously ends with a space.
Duane Hookom
Minnesota
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, August 14, 2017 7:24 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Cascading List Box from Option Group
Sent: Monday, August 14, 2017 7:24 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Cascading List Box from Option Group
Hi Duane,
1. As far as when to set the row source for lstSamples, does it matter? I thought that it perhaps did not matter when I set the row source, either before or after making a cboSampleGroup selection, as long as I did a requery in the after update of cboSampleGroup? Since the SQL statement actually only changes when the Option group selection changes, I thought that was the most logical place to set the row source.
2. Regarding using Me.cboSampleGroup versus Forms!frmSelectSample!cboSampleGroup, I thought the query engine was not able to utilize Me.xxx? I just had an email string with John last week and I thought that was the conclusion from that. I know that I cannot use Me.cboSampleGroup in the query design window, as I have tried that before. Is Me.cboXXX acceptable in code for the SQL statement, but not in the design window? Certainly the Me.cboXXX is less cumbersome.
3. I did not mention lstSampleResults in my question because I am not having any issues with that list. It is a child list to the lstSamples. When the user highlights a sample in the samples list, the analytical results for that sample show up in the lstSampleResults. It works fine as long as I can get a list of samples to show up in the lstSamples list box.
4. I noticed that in your example that you have an extra " " before the vbCrLf that I do not have in my code. I am assuming that is not necessary since both of my SQL statements are like this and one of them does work. In fact, they both work, just one of them will not populate the list box.
I will try your suggestions as it is not working my way; at least not for both Option group options.
__._,_.___
Posted by: david.pratt@outlook.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
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