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

Choice Fields

Status
Not open for further replies.

Gaylord

Technical User
Sep 26, 2002
49
DE
Hi,

I have a quick question.

I have a pretty basic database, where you can search via a drop down menu, this then returns that record and populates a bunch of list boxes with information.

So my questions are

1) I need to make a query for each list box to display the value, which seems a little time consuming.... is there an easier way of doing this??

2) Some of the columns have values of either 0 or 1, which I would like to display in choice field / tick box objects, but I seem to be unable to find any way of doing this....

Any help would be appreciated.

Best regards

Jamie
 
1) No. You must specify what data you want and where it comes from, or how will it know?

2) If they are yes/no fields then you should be able to bind any of the 'switch' controls directly to the field i.e. checkbox or option button. Be aware that if your data comes from SQL server, it stores yes/no fields differently and can cause major problems (Access 'Yes' = -1, SQL 'Yes' = 1).
 
Thanks Norris68, had a feeling that question 1 was like that.

As for question the values are form an electronic form originally, with a value of 1 for yes and 0 for no.... IS there a way of getting a filled choice field on my form to represent this?

Thanks

Jamie
 
The best way I have found is to use a 2-column combo box with a rowsource of 1;Yes;0;No, bound to the field.

You could possibly do it via code using a checkbox and the form Current and BeforeUpdate events, but if memory serves I still ran into problems with Access getting it's knickers in a serious twist (and requerying the form about 200 times each times you navigate records)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top