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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check just one unbound Radio buttons

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
0
0
PT
Hi,

I have a form (continious style) that is bound to a tablle, and I have unbounds radio buttons that are created as much as the records. What i want is for users to be able to select just one of the radio buttons (meaning they select the record), now when I select one all stay selected.

Thanks,

Albano
 
You cannot do much with unbound controls on continuous forms, as you have found.
 
you could create a temp table, load all your data into there, and then bound the form to that table...

--------------------
Procrastinate Now!
 
I often just put a bolean field in the table "blnIsSelected" . You may need to run an update query to clear out the checks once the form closes.
 
Hi,

I tray to put a boolean field on the table, but when I select one all stay selected, thirs any whay to make sameting like a options group (select just one options)

Albano
 
How are ya Albano . . .
Albano said:
[blue]I tray to put a boolean field on the table, but when I select one all stay selected . . .[/blue]
Did you add the new yes/no field to the form?

Calvin.gif
See Ya! . . . . . .
 
Hi Albano,

You'll need to run a procedure on the After_Update event of the check box to clear out the other selected record in order to only be able to select one record at a time. Something like:

DoCmd.RunSQL "UPDATE YourTable SET blnIsSelected = 0 WHERE YourIDField <> " & Me.YourIDField & ";"

Me.Requery

Should do the trick, although could be a bit slow if you have a lot of data on your form...

Cheers, Iain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top