Link to home
Start Free TrialLog in
Avatar of Issa S.
Issa S.

asked on

How to let a Yes/No switch select a One record from the displayed record set?

Hi All,,,

How to let a Yes/No switch select a One record from the displayed record set?

Like say a list of countries, I want to allow selecting one country only. i.e. If the user goes to other record, the first selection to be deselected.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What does selecting a record mean?

This requirement might actually be implemented more easily by storing the ID of the selected child record in the parent record.  That way, the selection of a new child record automatically overwrites the old ID.  Of course, this would change your queries but probably not dramatically.  I don't see any reason that this violates first normal form and it sure makes the requirement easier to implement.

If you keep the flag on the child record, you would need to intercept the update and first remove the flag from any existing records before allowing it to be saved to the current record.
Avatar of Issa S.
Issa S.

ASKER

Dear Rayan,,,
It is not "listbox or combo box".

My record set is a Data Set in a Sub Form which in turn is based on a query.
I need the Check-Box, (when = Yes)  for further processing after making this selection.
So I am concerned that the user can make one selection only.

I hope this clarifies the issue better.

Dear Pat,,,

Sure I am clearing these check-boxes before leaving the form.
I got the inspiration from you to stick an update query "After The Update Event" to clear all other selections except the current one.

I thought there could be an easier way.

Anyway I will try and let you know.

Thanks for both of you.
I thought there could be an easier way.
Easier than what?
Running an update query to clear existing selections
or
Storing the ID of the selected record in the parent record?
Avatar of Issa S.

ASKER

Dear Ryan,

My Combo box is attached herewith. It is based on a query from a table.
Is it possible to convert it to be a list box?
User generated image
Put the form into design view.  Click on the combo to select it.  Right click and choose the option to convert to a listbox.
Pat is right on that.

User generated image
Avatar of Issa S.

ASKER

It shame of me.   lol. Where do I find the " Build  Event... in order to convert it to List Box.

"User generated image

Sorry if it is too obvious.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Issa S.

ASKER

Sorry I thought that I closed this.
Thanks for the help. Problem is solved.