From: Nimish on 10 Apr 2010 16:25 Hello, I am designing a simple form to acquire a data. I have following table for which I am designing a form. Table Name: tblSecurities Market: Text Security: Text SecurityDescription: Text The market column can have values CAN or US only and I would like to have option buttons for this column. The problem is the value of the option button can be numeric and I have values as Text. Is it possible to map option button to a column of a table having text values. Nimish
From: Tom Wickerath AOS168b AT comcast DOT on 10 Apr 2010 17:06 Hi Nimish, You have two alternatives: 1.) Use a Value List that includes the following properties: Display Control: Combo Box Row Source Type: Value List Row Source: 1;US;2;CAN or 1;CAN;2;US, whichever is applicable Bound Column: 1 Column Count: 2 Column Widths: 0";0.5" 2.) Create a separate table of Countries linked 1:M with your main table. > ...and I would like to have option buttons for this column. An option group can be more problematic, because it is going to be up to you to maintain the correct values for each option button, such that they match the values in your value list or associated table. A better option, in my opinion, is to use a combo box. In fact, with a combo box, a separate lookup table of Countries could include just one text field with the values of US or CAN. That way, you would store these actual values in the foreign key field, which would make any resulting queries easier to deal with. Tom Wickerath Microsoft Access MVP http://www.accessmvp.com/TWickerath/ __________________________________________ "Nimish" wrote: > Hello, > > I am designing a simple form to acquire a data. I have following table for > which I am designing a form. > > Table Name: tblSecurities > > Market: Text > Security: Text > SecurityDescription: Text > > The market column can have values CAN or US only and I would like to have > option buttons for this column. The problem is the value of the option button > can be numeric and I have values as Text. Is it possible to map option button > to a column of a table having text values. > > Nimish
From: Duane Hookom on 10 Apr 2010 17:25 If you don't want to create a small lookup table with a numeric primary key, you can bind a locked text box to Market field. Then use code in the After Update event of your Option Group like: Me.txtMarket = Choose(Me.optgrpMarket, "CAN", "US") This assumes option values of 1 for CAN and 2 fro US. -- Duane Hookom MS Access MVP "Nimish" <Nimish(a)discussions.microsoft.com> wrote in message news:7C06EAB9-6511-46DD-AEB5-0628EBC985E1(a)microsoft.com... > Hello, > > I am designing a simple form to acquire a data. I have following table for > which I am designing a form. > > Table Name: tblSecurities > > Market: Text > Security: Text > SecurityDescription: Text > > The market column can have values CAN or US only and I would like to have > option buttons for this column. The problem is the value of the option > button > can be numeric and I have values as Text. Is it possible to map option > button > to a column of a table having text values. > > Nimish >
|
Pages: 1 Prev: Adding Data to a lookup column in a form Next: What is the key code for Microsoft Office 2010 |