Normal Topic Combo boxes in subforms (Read 743 times)
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Combo boxes in subforms
Nov 4th, 2005 at 2:52pm
Print Post Print Post  
If I try to place a combo box or a list box in a subform when I try to update from the mother form I do not get the combo o list box behavior.
I had to create another field in the mother form and place a tooltip on it to get help.
This helps but it is not an assurance that there will be no misspellings.
Is ther a way to make combo boxes to behave as such in subforms?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Combo boxes in subforms
Reply #1 - Nov 4th, 2005 at 3:11pm
Print Post Print Post  
Is your subform a Form View subform or a Table View subform?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Re: Combo boxes in subforms
Reply #2 - Nov 4th, 2005 at 4:24pm
Print Post Print Post  
I chose table view since I want to see all my subform records at one time.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Combo boxes in subforms
Reply #3 - Nov 4th, 2005 at 6:32pm
Print Post Print Post  
Table View subforms by nature do not display Combo boxes, List boxes, or some of the other element types. What you can do instead is offer a picklist, using @PopupMenu() for example, for the user to choose an option off of. An example of this can be found in the SesameSeasons sample application.


-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Re: Combo boxes in subforms
Reply #4 - Nov 7th, 2005 at 1:14pm
Print Post Print Post  
Thanks.
I used the first part of the programming and the popup menu works very well.
However, I am doing something wrong in the second part that forbids entering data directly into the subform.
My subform has only one field.
The subform name is Categorias and the field name is Categorias0.
It should be very easy but I canīt do it.
My code goes like this:

Else
{
     //Not showing as a Subform
     If @Mode() = 0 Then
     {
           //Disable Line Items form if in Add Data
           Label(Categorias, "Esta es la Forma Categorias. Usted no puede aņadir records directamente aqui")
           Visibility(Categorias0, 0)
                 }
     Else If @Mode() = 1 Then
     {
           If @ResultSetCurrentPosition() = @ResultSetTotal() Then
           {
                 //Prevents users from going past last record
                 NotifyForm(2)
           }
           else
           {
                 NotifyForm(0)
           }

           //All fields are now read-only to prevent changes to Categorias when not a subform.
           ReadOnly(Categorias0, 1)
     }
}


Where is the error?
Etejeira
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Combo boxes in subforms
Reply #5 - Nov 7th, 2005 at 1:56pm
Print Post Print Post  
You should see the Inside Sesame article titled "Result Set Total Totally Confused" on page 9 of the June 2005 issue.

In it, I explain why you should be using @FormResultSetCurrentPosition when subforms are present.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged