Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Buttons 1

Status
Not open for further replies.

rclarke

Technical User
May 14, 2001
78
GB
I have a list of seasons in a table on of these seasons has to be set as default I have a field in the table called default and is a logical value. Since the user has to be able to set the season aas the default season I thought the best way would be with radio buttons that they can select because there can only be one default season.

My question since I am a bit thick is how do I get the list of radio buttons to equal records in the seasons table????

Thanks in Advance


Rachel
 
try somthing like this
do case
case ogSession.value = 1
myfield = 'summer'
case ogSeason.value = 2
myfield = 'spring'
...
endcase
 
Hi Rachel,

Do you mean that the seasons are the rows in the table and that one of them has "default" set to .T.?

Jim
 
Yes Jim

Thats exactly what I mean sorry for the long delay in answering you but I have been off
 
Hi Rachel,

I'm assuming each record in the seasons table has some sort of "season identifier".

select * from seasons where default = .T. into cursor d
do case
case d.season = 'winter'
radiobutton.value = 1
case d.season = 'spring'
radiobutton.value = 2
etc.
endcase

The above code could be placed in the init or refresh event of the radiobutton control.

Jim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top