Hi Bill,
I think an array would work -- pasted my basic array information in another response ;)
uploaded your 2007 accdb ... soon as I have menu bar stuff I'll make another ACCDE
I uploaded the ACCDE I made so you can put something on your site now.
Warm Regards,
Crystal
*
(: have an awesome day :)
*
________________________________
From: Bill Mosca
Mike
As far as I know, there is no way to do that. a variable cannot be dynamically changed. Only its value. What you are trying to do is tantamount to re-writing the code itself. Definitely not practical.
If you give us the reason for this maybe we can give you a better approach.
Bill
--- In MS_Access_Professionals@yahoogroups.com, mithomas48 <no_reply@...> wrote:
>
> Thanks Bill, but I'm trying to stay away from using a Select Case or If Else. Isn't there a simple function or something that can dynamically change a variable? For example...
>
> In each pass the variable "b" would become b0, then the next pass b1 and so on.
>
> Thanks again!
> Mike
>
> --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@> wrote:
> >
> > Mike
> >
> > Use a counter in the loop and a select case
> >
> > For x = 1 to 3
> > Select Case x
> > Case 1
> > v1 = Something
> > 'or
> > Something = v1
> > Case 2
> > v2 = Something
> > 'or
> > Something = v2
> > Case 3
> > v3 = Something
> > 'or
> > Something = v3
> > End Select
> > Next
> >
> > Regards,
> > Bill Mosca, Founder - MS_Access_Professionals
> > http://www.thatlldoit.com
> > Microsoft Office Access MVP
> > https://mvp.support.microsoft.com/profile/Bill.Mosca
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com, mithomas48 <no_reply@> wrote:
> > >
> > > How can I dynamically reset a variable within a loop - without using a Select Case, or IF Else? For Example...
> > >
> > > First pass = v1
> > > Second pass = v2
> > > Third pass = v3
> > >
> > > So I need to dynamically set the last digit.
> > >
> > > Thanks in advance!
> > > Mike
> > >
> >
>
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Jumat, 27 Januari 2012
Re: [MS_AccessPros] Re: Dynamic Varialbe
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar