Thanks to Gary Traub for his instructions in pointing me to the use of a contitional object instead of a tabbed object. He is right, I love it! Here's what Gary had to say:
You can use as many layers as you want - and can easily put embedded browses or any other objects.
All you need to do is this:
1. Create a layout variable called say condtest as n
2. Use the toolbox to create a conditional object on your form.
3. The object by default will be called cond1.
4. Right click on it and define as many layers as you want. For example,
condtest=1 Ledger
condtest=2 Enter Charge
condtest=3 Enter Payment
5. Once you have defined the layers as described in step 4, then go ahead and put whatever objects you want on each layer. To do that, right click on the conditional object and you will see the layers you just defined. Select each in turn to place the fields, browses, frames, etc that you want on each layer.
6. Now all that is left to do is to place buttons to select the various layers. In this example, you could have 3 buttons labeled: Ledger, Enter Charge, and Enter Payment. Each button would have the following code:
For the "Ledger" button:
condtest=1
cond1.refresh()
For the Enter Charge button:
condtest=2
cond1.refresh()
For the Enter Payment button:
condtest=3
cond1.refresh()
This may seem complicated or like a lot of work, but after you do it once or twice, it's very easy, and I really believe you will love it.
-------------------------------------
Here's what I figuered out and Gary concurred:
If you want the conditional object to act like a tabbed object, you can use buttons to emulate the tabbed object. Else, you can use contitional statements on a field to activate a certain layer. There are many possibilties, thanks to Selwyn and his crew.
To tab from layer to layer and begin with the first field in the tab order for that layer , that's just as easy. You do not need to set the tab order for all the layers as in 1 through 36. You only need the tab order in the sequence you would like for that layer. As a matter of fact, it really makes no difference what layer is next as you can use this code to go to whatever layer you wish. Thus the use of a conditional statement on a field in layer 1, could take you to any layer.
This code goes on the last field (OnDepart event) in the tab order:
condtest=2
cond1.refresh()
field_name.activate()
Hope this is of help. Email me if you get stuck.
kenn
You can use as many layers as you want - and can easily put embedded browses or any other objects.
All you need to do is this:
1. Create a layout variable called say condtest as n
2. Use the toolbox to create a conditional object on your form.
3. The object by default will be called cond1.
4. Right click on it and define as many layers as you want. For example,
condtest=1 Ledger
condtest=2 Enter Charge
condtest=3 Enter Payment
5. Once you have defined the layers as described in step 4, then go ahead and put whatever objects you want on each layer. To do that, right click on the conditional object and you will see the layers you just defined. Select each in turn to place the fields, browses, frames, etc that you want on each layer.
6. Now all that is left to do is to place buttons to select the various layers. In this example, you could have 3 buttons labeled: Ledger, Enter Charge, and Enter Payment. Each button would have the following code:
For the "Ledger" button:
condtest=1
cond1.refresh()
For the Enter Charge button:
condtest=2
cond1.refresh()
For the Enter Payment button:
condtest=3
cond1.refresh()
This may seem complicated or like a lot of work, but after you do it once or twice, it's very easy, and I really believe you will love it.
-------------------------------------
Here's what I figuered out and Gary concurred:
If you want the conditional object to act like a tabbed object, you can use buttons to emulate the tabbed object. Else, you can use contitional statements on a field to activate a certain layer. There are many possibilties, thanks to Selwyn and his crew.
To tab from layer to layer and begin with the first field in the tab order for that layer , that's just as easy. You do not need to set the tab order for all the layers as in 1 through 36. You only need the tab order in the sequence you would like for that layer. As a matter of fact, it really makes no difference what layer is next as you can use this code to go to whatever layer you wish. Thus the use of a conditional statement on a field in layer 1, could take you to any layer.
This code goes on the last field (OnDepart event) in the tab order:
condtest=2
cond1.refresh()
field_name.activate()
Hope this is of help. Email me if you get stuck.
kenn
Comment