Connecting Tech Pros Worldwide Help | Site Map

Empty 29 comboboxes?

Henrootje
Guest
 
Posts: n/a
#1: Mar 12 '07
I have a form with 29 comboboxes.
The are called me.combocg1, me.combocg2, me.combocg3 etc etc

What is the best way to empty them?

For i = 1 To 29
varCombo = "me.combocg" & i
WaardeOnthouden = ""
varCombo = WaardeOnthouden
Next

does not do the trick :s

Ideals anyone?

Suggestions ans thinking along with me are greatly appreciated!

Allen Browne
Guest
 
Posts: n/a
#2: Mar 12 '07

re: Empty 29 comboboxes?


Try:

For i = 1 to 29
Me("combocg" & i) = Null
Next

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Henrootje" <HenroV@gmail.comwrote in message
news:1173695613.709766.271680@p10g2000cwp.googlegr oups.com...
Quote:
>I have a form with 29 comboboxes.
The are called me.combocg1, me.combocg2, me.combocg3 etc etc
>
What is the best way to empty them?
>
For i = 1 To 29
varCombo = "me.combocg" & i
WaardeOnthouden = ""
varCombo = WaardeOnthouden
Next
>
does not do the trick :s
>
Ideals anyone?
>
Suggestions ans thinking along with me are greatly appreciated!
Henrootje
Guest
 
Posts: n/a
#3: Mar 12 '07

re: Empty 29 comboboxes?


Allen,

I personally will make sure that you get your own statue in the parc
where I live!
It is in Enschede, Netherlands, Europe so unfortunately you will
probably not be able to see it.
Viewing it through Google Earth might be a bit hard with alle the
trees in the parc blocking the view and all. <grin>

But rest assured that I think that you deserve a statue and you should
relish in the fact that there is one bearing your name.

Oh, and the code works swell!!!!


greetings, Henro


On 12 mrt, 12:08, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Quote:
Try:
>
For i = 1 to 29
Me("combocg" & i) = Null
Next
>
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>
"Henrootje" <Hen...@gmail.comwrote in message
>
news:1173695613.709766.271680@p10g2000cwp.googlegr oups.com...
>
>
>
Quote:
I have a form with 29 comboboxes.
The are called me.combocg1, me.combocg2, me.combocg3 etc etc
>
Quote:
What is the best way to empty them?
>
Quote:
For i = 1 To 29
varCombo = "me.combocg" & i
WaardeOnthouden = ""
varCombo = WaardeOnthouden
Next
>
Quote:
does not do the trick :s
>
Quote:
Ideals anyone?
>
Quote:
Suggestions ans thinking along with me are greatly appreciated!- Tekst uit oorspronkelijk bericht niet weergeven -
>
- Tekst uit oorspronkelijk bericht weergeven -

Tim Marshall
Guest
 
Posts: n/a
#4: Mar 12 '07

re: Empty 29 comboboxes?


Henrootje wrote:
Quote:
But rest assured that I think that you deserve a statue and you should
relish in the fact that there is one bearing your name.
>
Oh, and the code works swell!!!!
Yes, we're erecting one here in St. JOhn's, Newfoundland, CAnada, as
well... 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
David W. Fenton
Guest
 
Posts: n/a
#5: Mar 12 '07

re: Empty 29 comboboxes?


"Allen Browne" <AllenBrowne@SeeSig.Invalidwrote in
news:45f534b5$0$8402$5a62ac22@per-qv1-newsreader-01.iinet.net.au:
Quote:
Try:
>
For i = 1 to 29
Me("combocg" & i) = Null
Next
This is the kind of thing I'd use a custom collection for. I've
written about it many times in this newsgroup, so getting
instructions ought to be quite easy by some searching on this email
address and "custom collection" on Google Groups.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Closed Thread


Similar Microsoft Access / VBA bytes