Re: Switch alias names....



OK, hold on...

Filtered indexes? That's almost always a sign you've derailed even before
you began.

(I was afraid of this when I originally responded.)

I think you'd be much better served with a parameterized local view for your
filtering.

Dan


Andy Trezise wrote:
That's how I want to do it Dan.

Each table is used as recordsource to it's own grid (on separate
pages of a pageform).

table1: order1 = "index on sequence for recordtype=1"
table2: order2 = "index on sequence for recordtype=2"

all that's fine.

I then want to do something like this:

DO FORM "form2" WITH "foo"
or
DO FORM "form2" WITH "bar"

and then in the INIT event 'fool' all the controls on the form into
reading data from the correct table.....preferably with just 1/2
lines of code without having to change the controlsource on each
control (of which there are many of varying types).

Andy


"Dan Freeman" <spam@xxxxxxxxxxxxx> wrote in message
news:%23PjleTnSJHA.408@xxxxxxxxxxxxxxxxxxxxxxx
You can't change an alias once established, but you can certainly
have more than one alias with different orders in each:

Use table again in 0 alias foo order 1
use table again in 0 alias bar order 2

Dan

Andy Trezise wrote:
Is there any way of being abe to switch the alias name that a table
is referenced by once it has been opened without first closing it
and reopening it again?

I want to open the same table twice on a form. The tables will be
referenced as ALIAS1 & ALIAS2. One of the aliases will allow me to
list records of one type in a given order and the other alias
records of a different type in another sequence. Thus neither alias
should ever present the same data from the underlying table

Form1 then opens form2....I would like to reference one of the two
tables on this send form (by passing a parameter) as ALIAS3

So for example if I pass value '1' I'd like to rename ALIAS1 to
ALIAS3 and if I pass value '2' I rename ALAIS2 to ALIAS3

It just means I can have a 'common' form2 that can reference either
table without the need to know it's true alias?

If this is not possible is there any other way to do it?


.



Relevant Pages

  • Re: Switch alias names....
    ... and then in the INIT event 'fool' all the controls on the form into reading ... Use table again in 0 alias foo order 1 ... So for example if I pass value '1' I'd like to rename ALIAS1 to ... It just means I can have a 'common' form2 that can reference either ...
    (microsoft.public.fox.programmer.exchange)
  • Re: true-random number generator (TRNG) info.
    ... was putting forth a crackpot idea? ... I guess his reference to poker wasn't much ... Uhhhh....you didn't say anything at all about his creating an alias ... You have a warped understanding of the word "logic". ...
    (rec.gambling.poker)
  • Re: Create Table/Record Controls Form
    ... If I use the same alias, it would appear that the ... Since I had problems with the custom controls toolbat upgrading to even ... In addition to Dave's excellent advice re the generic form template, ...
    (microsoft.public.access.formscoding)
  • Re: Random Network Droping, advice needed
    ... alias usb-controller usb-uhci ... # Controls source route verification ... # Controls the System Request debugging functionality of the kernel ... # Controls whether core dumps will append the PID to the core filename. ...
    (Fedora)
  • Re: OSRegSetValueEx versus RegSetValueEx
    ... I went through code and almost each function has some Alias attached to it. ... >> I cannot find any reference to it on MSDN site, ... > It's an excellent registry class that I use whenever I need registry ...
    (microsoft.public.vb.general.discussion)

Loading